_lowView 添加了单击手势
[self.view addSubview:_lowView];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(lowViewTap)];
[_lowView addGestureRecognizer:tap];
造成的结果: table单击cell,正常单击无反应,需要长按几秒才返回正常值。
解决方法:
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(lowViewTap)];
tap.delegate = self;
[_lowView addGestureRecognizer:tap];
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}