ios 手势的点击事件和cell的点击事件 冲突怎么解决
1个回答
展开全部
手势传递下去了,cell没有拦截到手势,在蒙版写一个手势对象,然后通过代理监听一下,到底是点到了蒙版还是cell,然后限制一下
友情代码提示
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
if ([touch.view isKindOfClass:[UIButton class]]){
return NO;
}
return YES;
}
友情代码提示
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
if ([touch.view isKindOfClass:[UIButton class]]){
return NO;
}
return YES;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询