ios - numberOfSectionsInTableView not called -


in viewcontroller, have uitableview , these methods :

func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int {     if(self.mquoteobjects.count > 0){         return 1     }     return 0  }   func tableview(tableview: uitableview, numberofsectionsintableview section: int) -> int {     let nbitem = self.mquoteobjects.count     return nbitem  } 

method "numberofrowsinsection" correctly called, "numberofsectionsintableview" never called.

what have missed?

you can respond in obj-c

the name of method not correct. should numberofsectionsintableview(_:).

see uitableviewdatasource protocol reference.

func numberofsectionsintableview(tableview: uitableview) -> int {     return self.mquoteobjects.count } 

Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -