複数のセクションを持つグループ化されたテーブルビューを使用しています。そして、indexpath メソッドで didselectrow に複数選択の機能を実装する必要があります。私のコードは次のとおりです。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)path
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:path];
if (cell.accessoryType == UITableViewCellAccessoryCheckmark)
{
cell.accessoryType = UITableViewCellAccessoryNone;
}
else
{
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
}
これにより、複数のセルを選択できますが、そのときにテーブルビューをスクロールすると、選択が消えます。