开发者

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];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜