No index path for table cell being reused

前端 未结 13 1541
执念已碎
执念已碎 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
    2021-02-04 05:54

    I had the same issue. This message appears when I scroll and cells are reused.

    A lot answers talked about viewForHeaderInSection but I didn't use them. In case someone has the similar problem, I hereby show my solution.

    I added observer to the textfields inside each cell. I wonder whether this is the observer that caused this issue as I didn't remove the observers when a cell is recycled.

    So I removed the observer when a cell is deinited.

    It seems the problem is solved. I cannot guarantee.

提交回复
热议问题