UITableViewCellAccessory Disappears When Scrolled Off Screen

前端 未结 5 521
独厮守ぢ
独厮守ぢ 2021-01-22 12:42

I have a UITableView filled with objects. In the didSelectRowAtIndexPath method i have a UITableViewCellAccessoryCheckmark appear when the row is selected and disappea

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-22 13:19

    Try to store selected index in a array or dictionary for the selected cell in didSelectRow method, and in cellForRowAtIndexPath check if that index is available in array then checkmark the cell with setting accesoryType. Hope you understand

提交回复
热议问题