我一直在尝试UITableView
使用以下委托方法删除中的特定行
tableView commitEditingStyle:editingStyle forRowAtIndexPath:
我的意图是不只为特定单元格显示“删除”按钮。请任何人都可以帮助我如何解决这个问题。
我一直在尝试UITableView
使用以下委托方法删除中的特定行
tableView commitEditingStyle:editingStyle forRowAtIndexPath:
我的意图是不只为特定单元格显示“删除”按钮。请任何人都可以帮助我如何解决这个问题。
使用以下 Datasource 方法UITableView
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the apply specified item to be editable.
if("Your Condition") // such like indexPath.row == 1,... or whatever.
return YES;
else
return NO;
}
简而言之,您要编辑return YES
的特定行/单元格return NO;