开发者

How to prevent UITableView interaction while UITextField is FirstResponder

Is there a simple way to开发者_StackOverflow社区 prevent user interaction while entering text in a UITextField (the textfield is in a cell of the tableView)?

I've already tried this:

- (void)textFieldDidBeginEditing:(UITextField *)textField {
    self.tableView.userInteractionEnabled = NO;
}

with the result that the keyboard also stops showing up...


The first thought that comes to mind is adding a transparent UIView overlay that would "mask" everything surrounding your cell, intercepting all the touch events. I suppose it would have to be two overlays - one for above the cell and one for below.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜