Strange error when adding items to prototype cells in storyboard-IB

前端 未结 7 1178
甜味超标
甜味超标 2020-12-13 13:33

I have quite a large project (~20 scenes). One of which is a TableViewController with a custom UITableViewController class. I have given the cell a reuse identifier, and add

7条回答
  •  清歌不尽
    2020-12-13 13:51

    I had the same error myself. Just to add one more potantial root cause for future readers:

    In my case I copied a control (a Button in this case) from one prototype cell to the next and the action still referred to the neighbor cell. My table has several different prototype cells.

    The fact, that it acutally was a proper subclass of UITableViewCell which was properly connected to the prototype cell made it difficult to actually see the mistake.

提交回复
热议问题