Update UITableViewCell without reload

后端 未结 4 1225
广开言路
广开言路 2020-12-18 11:56

So here\'s my situation:

I have a UITableView where each cell has some buttons.
In the cellForRowAtIndexPath I set the indexpath of the row so when the a button

4条回答
  •  太阳男子
    2020-12-18 12:59

    It is better not to store the indexPath with the buttons. In the button action handler (which is either a method in your cell subclass or in your viewController) you could identify the cell, and subsequently determine the indexPath using -indexPathForCell:.

提交回复
热议问题