I am using UITableViewCellAccessoryCheckmark
in didSelectRowAtIndexPath
cell should be marked.But when i am scrolling down the UITableView
checkmark is also effecting reusable cells of UITableView
.How solve this issue?
Asked
Active
Viewed 72 times
0

Teja Nandamuri
- 11,045
- 6
- 57
- 109

Tejaswi iitv
- 71
- 1
- 9
-
You need to track the cell selection state and set/reset the accessory in `cellForRowAtIndexPath` – Paulw11 Sep 08 '15 at 12:56
-
Cell reusage was already discussed hundred of times. – Avt Sep 08 '15 at 12:57
-
i want to know how to track those values.not about cell reusage – Tejaswi iitv Sep 08 '15 at 13:02
-
i tried both the examples but i am unable to do thats y i placed this question back. – Tejaswi iitv Sep 08 '15 at 13:04
-
The listed duplicates show several methods for tracking selection state. If you are having difficulty implementing those solutions then you should ask a new question that shows your code and describes the specific issue tap hat you are having. – Paulw11 Sep 08 '15 at 13:09
1 Answers
-1
Since your cells will be reused when scrolling, make sure to initialize all aspects of your cell in all cases. Therefore, don't forget to initialize your cell to UITableViewCellAccessoryNone
when you do not need a check mark.

Jean Le Moignan
- 22,158
- 3
- 31
- 37