Hide/Disable edit button on select UITABLEVIEW cells?
I have a UITABLEVIEW where I want to show the delete function for only certain cells (that is, certain cells are user deletable certain cells aren't). As far as I can tell, seteditable: is only set at the table level. Is there a way to override this or hide the delete button on certain 开发者_StackOverflowcells?
You should implement
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
in tableview delegate. There you can return appropriate editing style for your cells: UITableViewCellEditingStyleDelete for deletable cells, UITableViewCellEditingStyleNone for others
精彩评论