【发布时间】:2014-06-10 09:41:51
【问题描述】:
我正在使用:
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
initWithTarget:self
action:@selector(dismissKeyboard:)];
[self.view addGestureRecognizer:tap];
为了在从UITextField 中单击其他任何位置时关闭键盘。
但是,在我看来,我有 UITableView ,我必须检测何时单击 UITableView 的行。
因为UITapGestureRecognizer 我的didSelectRowAtIndexPath 函数没有被调用。有什么方法可以检测点击的对象是否是UITableViewCell?
【问题讨论】:
标签: ios xcode5 uitableview uitapgesturerecognizer