No index path for table cell being reused

前端 未结 13 1508
执念已碎
执念已碎 2021-02-04 05:18

This started to happen out of the blue. Any ideas: Code:

CUSTOMCLASSNAME (I have replaced the actual class name as it contains the name of the client.)

Initialis

13条回答
  •  闹比i
    闹比i (楼主)
    2021-02-04 06:02

    can you try the following (provided you do not have any specific configuration for a cell at that indexpath) :-

    CustomClassName *cell=[tableView dequeueReusableCellWithIdentifier:[self reuseIdentifier]];
    if(cell==nil)
    {
    cell=[[CustomClassName alloc] initWithStyle:whatever_style reuseIdentifer:[self reuseIdentifier]];
    }
    

    Please also post what error you are getting if the above does not work.

    Also have a look at the following link:-

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

提交回复
热议问题