您的位置:首页 > 其它

如何获取相应tableview中的touchesBegan事件

2014-08-19 17:31 816 查看
项目中使用了UITableViewController,里面有用到UITextView需要点击键盘外的地方来隐藏我的键盘

自定义一个uitableview,继承UITableView。重写touch事件

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

[super touchesBegan:touches withEvent:event];

[[UIApplication sharedApplication].keyWindow endEditing:YES];

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: