手势 - 判断点击位置是否在某区域 ( View ) 内
变更记录
序号 | 录入时间 | 录入人 | 备注 |
---|---|---|---|
1 | 2016-04-14 | Alfred Jiang | - |
方案名称
手势 - 判断点击位置是否在某区域 ( View ) 内
关键字
手势 \ 点击位置 \ 区域 \ UITapGestureRecognizer
需求场景
- 需要对手势操作的点击位置进行判断时
- 判断点击位置是否在某控件中时
参考链接
(无)
详细内容
判断 UITapGestureRecognizer 点击位置是否在 _viewTest 控件中
方法一:CGRectContainsPoint
1 | - (void)touchMainViewGesture:(UITapGestureRecognizer *)gesture |
方法二:*- (BOOL)pointInside:(CGPoint)point withEvent:(nullable UIEvent )event
1 | - (void)touchMainViewGesture:(UITapGestureRecognizer *)gesture |
效果图
(无)
备注
(无)
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 宁静至远,博雅多通!