Only one UITableViewCellAccessoryCheckmark allowed at a time

前端 未结 2 1299
灰色年华
灰色年华 2021-01-06 17:42

I have a tableview with a section that contains a list of sounds the user can \"pick.\" Only the currently selected sound should show a UITableViewCellAccessoryCheckma

2条回答
  •  囚心锁ツ
    2021-01-06 18:20

    In - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPathafter each declaration of cell try reseting the cells accessoryType by adding following line: cell.accessoryType = UITableViewCellAccessoryNone;

提交回复
热议问题