eugene
eugene

Reputation: 41765

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?

Upvotes: 2

Views: 2523

Answers (1)

arturdev
arturdev

Reputation: 11039

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.

Upvotes: 10

Related Questions