ios - tableview 只执行numberOfRowsInSection,不执行cellForRowAtIndexPath代理方法
PHPz
PHPz 2017-04-17 17:54:21
0
5
795

tableview是用storyboard创建的,我在代码中执行[self.tableView reloadData];
执行numberOfRowsInSection的时候返回的值是 value > 0 的。但是不执行cellForRowAtIndexPath方法。

代理也已经设置好。

PHPz
PHPz

学习是最好的投资!

reply all(5)
左手右手慢动作

Is it true that the cellForRowAtIndexPath function is not used? You can stop and take a look. Is it possible that you didn’t notice that he was gone

阿神

Is [self.tableView reloadData] not written in the main thread?

Ty80

Are you sure it is cellForRowAtIndexPath? If you take a closer look, you may be confused. There is another function that is very similar to this one

黄舟

I happen to also encounter this problem, did you solve it? How to solve it?

阿神

Under what circumstances is data reloaded? If it is downloaded asynchronously, it must be returned to the main thread to refresh.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template