How to remove editinng mode by touching on tableview?
If you click on the Edit button, you see the red stop signs. How to r开发者_JS百科emove this when user touch on the tableview or tableview cell?
Please help me for this Thanks in advance
Use setEditing
method of UITableView
.
- (void)setEditing:(BOOL)editing animated:(BOOL)animate
Like below
[myTableView setEditing:NO animated:YES];
If you want to stop editing on cell selection then use this method:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[myTableView setEditing:NO animated:YES];
}
精彩评论