ios - Unexpected found nil will unwrapping an Optional value occurs when setting a property of UITableView -


override func viewdidload() {     super.viewdidload()      tableview.separatorinset = uiedgeinsetszero     tableview.tablefooterview = uiview()      appdelegate = uiapplication.sharedapplication().delegate as! appdelegate     initializefetchedresultscontroller() } 

the line tableview.separatorinset = uiedgeinsetszero executes fine, next line breaks apparently trying unwrap optional:

tableview.tablefooterview = uiview() 

enter image description here

i ran problem. upon setting tableview footer programmatically seems reloaddata called, table begins looking data, , calls numberofsectionsintableview before viewdidload completes. if setting table data in viewdidload after assigning tableview footer data nil , crashes app.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -