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
Post a Comment