1

I have thumbnail view of images on the bottom of root view controller. It works fine in the middle of the page but when i single tap on the left or right corner of the thumbnail view it curls the page view instead of thumbnail image selection.

I have tried following function but this function does not work in my case.

-(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;
    }
Maen
  • 10,603
  • 3
  • 45
  • 71
user1171158
  • 11
  • 1
  • 4

1 Answers1

3

Bit late but I had this problem too and solved it with this. Hope that helps you or someone else stumbling around like I was. Some other good answers and discussion there too.

Community
  • 1
  • 1
Kieran Harper
  • 1,098
  • 11
  • 22