Reputation: 4323
I have a UITableView
and a problem I am facing is that sometime cellForRowAtIndexPath
is called in a wrong order.
We have 6 rows and one section in a table. cellForRowAtIndexPath
is called in the order (0, 2), (0, 3), (0,4), (0,5)
. So when the table loads, it shows the 3rd row at the top. Now when I scroll down, cellForRowAtIndexPath
is again called with (0,1)
and (0,0)
and table jumps and shows row 0 at the top.
Update: it seems that heightForRowAtIndexPath delegate was implemented and was incorrectly returning zero for the every indexPath. Although removing it solved the issue, the mystery remains why it was starting indexPath at (0,2). Any logical explanation?
Upvotes: 0
Views: 206
Reputation: 4323
it seems that heightForRowAtIndexPath delegate was implemented and was returning zero for the every indexPath. Although removing it solved the issue, the mystery remains why it was starting indexPath at (0,2)
Upvotes: 1