2010-08-24 60 views

回答

3

实现表委托editingStyleForRowAtIndexPath方法并返回取决于细胞的指数风格值:

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView 
      editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{ 
    //Disable editing for 1st row in section 
    return (indexPath.row == 0) ? UITableViewCellEditingStyleNone : UITableViewCellEditingStyleDelete; 
}