I want to implement -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
gesture delegate in pageviewcontroller.m file but i can't get any gesture as:
NSArray *temp = self.gestureRecognizers;
NSLog(@"count %i",temp.count); // this logs count 0
NSArray *temp = self.view.gestureRecognizers;
NSLog(@"count %i",temp.count); // this also logs count 0
for (UIGestureRecognizer *gR in temp) {
gR.delegate = self;
}
in above code self is pointing towards pageviewcontroller.
therefore i can't assign delegate to pageviewcontroller gestures.
Edited Part:
OK I got it, I am not getting any gesture object because of uipageviewscroll style.
But I have a problem I need to disable pageviewcontroller pan gesture and need to scroll the pageviewcontroller from two buttons, like if user try to pan, and it's starting point is inside my uibuttons frame then pageviewcontroller should scroll otherwise not.
I am using transitionStyle UIPageViewControllerTransitionStyleScroll.
Any solution for this... Thanks in advance