【发布时间】:2013-04-08 09:07:52
【问题描述】:
在我的 ViewController 中,我得到了 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 但这永远不会被调用。我搜索了为什么没有调用它,发现我使用了这个:
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
initWithTarget:self
action:@selector(dismissKeyboard)];
[self.view addGestureRecognizer:tap];
在点击背景时关闭键盘。知道如何解决这个问题,即背景上的dismisskeyboard点击和didSelectRowAtIndexPath都可以工作吗?
【问题讨论】:
-
您的实际要求是什么?
标签: iphone ios objective-c