iOS 在tableView或scrollView上,消退键盘
2016-04-15 14:12
525 查看
给tableView或scrollview添加手势
1.UITapGestureRecognizer *gesture = [[UITapGestureRecognize alloc]initWithTarget:self action:@selector(resignKeyBoardGestureWithTableView:)];
2.gesture.cancelsTouchesInView =
NO;//当前控件响应后会传播到其他控件上,默认yes
3.[_tableView
addGestureRecognizer:gesture];
其中第二行的作用是防止在tableview上selected点击事件不起作用
1.UITapGestureRecognizer *gesture = [[UITapGestureRecognize alloc]initWithTarget:self action:@selector(resignKeyBoardGestureWithTableView:)];
2.gesture.cancelsTouchesInView =
NO;//当前控件响应后会传播到其他控件上,默认yes
3.[_tableView
addGestureRecognizer:gesture];
其中第二行的作用是防止在tableview上selected点击事件不起作用
相关文章推荐
- iOS开发之WMPageController的使用
- iOS RunLoop笔记
- iOS开发 引入支付宝 缺少 #include <openssl/asn1.h>
- iOS 版本更新迭代
- iOS开发中的一些图片上传压缩处理
- iOS 相关路径
- iOS常用数学常量宏
- iOS常用的数学函数
- 【iOS学习笔记 16-4-15】正则表达式基础
- ios / % 四舍五入 向上取整(ceil()) 向下取整(floor())
- Masonry
- IOS学习笔记——CocoaPods安装使用
- IOS学习之——navigationController的界面跳转方法
- 不能选择设备(真机,模拟器都不可以)
- iOS crash dSYM
- iOS路径问题
- iOS集成构建
- iOS小结
- iOS presentViewController 之后设置界面透明
- iOS中的动画