我在根视图控制器底部有图像的缩略图。它在页面中间工作正常,但是当我单击缩略图视图的左下角时,它会卷曲页面视图而不是缩略图选择。
我试过以下功能,但这个功能在我的情况下不起作用。
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
NSLog(@"overiding page curl feature");
//Touch gestures below top bar should not make the page turn.
//EDITED Check for only Tap here instead.
if ([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]]) {
CGPoint touchPoint = [touch locationInView:self.view];
if (touchPoint.y > 40) {
return NO;
}
else if (touchPoint.x > 50 && touchPoint.x < 430) {
//Let the buttons in the middle of the top bar receive the touch
return NO;
}
}
else{NSLog(@"in else case");}
return YES;
}