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

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -