简体   繁体   中英

numberOfRowsInSection called multiple times but cellForRowAtIndexPath never called

I am tracking my code using NSLog at every minute state. For whatever reason numberOfRowsInSection is being called in an endless look, returning 1 correctly; but cellForRowAtIndexPath is never called. Any ideas what might cause this?

My table and the ViewController are laid out entirely using storyboard. This is the first time I am encountering this problem. Normally whether I use magic numbers or not, if numberOfRowsInSection is called then cellForRowAtIndexPath will be called. Why not this time? [self.tableView reloadData]; is supposed to trigger them both.

您忘记设置TableView的数据源。

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