Reputation: 39374
HI In my appliacation I want deletion control button will not work for first row except for all other rows.
Please can anybody tell me how it would be possible.
Thanks
Upvotes: 1
Views: 187
Reputation: 170839
Implement editingStyleForRowAtIndexPath method in table delegate and return style value depending on cell's index:
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView
editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
//Disable editing for 1st row in section
return (indexPath.row == 0) ? UITableViewCellEditingStyleNone : UITableViewCellEditingStyleDelete;
}
Upvotes: 3