iOS UITableViewCellAccessoryCheckmark Visible ob every scroll

后端 未结 4 1165
甜味超标
甜味超标 2021-01-28 02:50

I have a list which I have using as a check boxes. I have enable or disable Check mark on row on select. But when I scroll the list its make mark row after every 10 rows.

<
4条回答
  •  无人共我
    2021-01-28 03:01

    Its because UITableView reuses the cell. So, in the method cellForRowAtIndexPath, you will have to check for a particular cell (of a particular section and row), if it needs to be checked on, provide the accessory type.

    If not needed for that cell, provide accessory type as none.

提交回复
热议问题