What is the meaning of the “no index path for table cell being reused” message in iOS 6/7?

前端 未结 14 2279
一整个雨季
一整个雨季 2020-11-27 15:12

Since starting to compile my app with iOS 6 (and since also iOS 7) I\'ve started seeing this message. I know that the way that UITableViews go about managing cells is diffe

14条回答
  •  温柔的废话
    2020-11-27 15:52

    Well, I just used the better part of a day trying to figure this out, so hopefully this alternative explanation saves somebody else some time.

    I had a tableview which was giving this message sometimes, when loading. It turned out to be caused by KVO notifications for Core Data objects firing while the view was loading. (On observing a change, my controller tried called reloadData on the tableview in question. Fixed by not observing the objects until the view had finished loading (previously I started observing the object once it was assigned via the accessor)

    TLDR: Check to see if you might be trying to reload your data from something other than the main thread.

提交回复
热议问题