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++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -