How to uncheck all rows using UITableViewCellAccessoryCheckmark

后端 未结 4 1242
栀梦
栀梦 2021-02-20 10:48

I\'ve got a UITableView with each row containing a checkbox using UITableViewCellAccessoryCheckmark. I can\'t figure out how to uncheck all the checkbo

4条回答
  •  南笙
    南笙 (楼主)
    2021-02-20 11:14

    Yes, cellForRowAtIndexPath: uses NSIndexPath instead of integer so make indexpath by using

    indexPathForRow:inSection:
    

    if you are using one section then your loop is fine just pass i in row and 0 for section.

提交回复
热议问题