简体   繁体   中英

ios, tableview cellForRowAtIndexPath not called

  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) 

is getting called and returning non zero value.

but the following code isn't getting called.. why?

 func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell

tableView is initially 0 size, and supposed to grow dynamically, would it be the cause of this?

cellForRowAtIndexPath will not be called if tableView's size is zero!
And you must not keep any logical part in that method. You must use that method only for updating the ui, no more.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM