标签:io os ar for 数据 art cti on c
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
return ([[touch.view class] isSubclassOfClass:[UIButton class]]) ? NO : YES;
}
这个方法不靠谱,我点击的是UIToolbar里的UIBarButtonItem
,打印出来的却是UIToolbarTextButton
,这个类我没找到,结果只能用字符串匹配了。
if ([[NSString stringWithFormat:@”%@”,[touch.view class]] isEqualToString:@”UIToolbarTextButton”]) {
return NO;
}
巨大的坑啊
标签:io os ar for 数据 art cti on c
原文地址:http://www.cnblogs.com/walkerwang/p/3978640.html