swift tableview how to select all rows

前端 未结 3 1833
刺人心
刺人心 2021-01-26 19:12

I have Button in tableview I want when I press that button will select all cell rows, how to do that? I tried alot but I got nothing

I\'m so confused how to make the but

3条回答
  •  Happy的楠姐
    2021-01-26 20:01

    In cellForRowAtIndexPath:

    UITableViewCell *cell...
    
    cell.accesoryType = isSelectAll ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
    

提交回复
热议问题