This has only started happening with ios6, but if you start a new project using the page view controller template. Then in
PCRootViewControlle::viewDidLoad()
add the lines to the bottom of the method.
for (UIGestureRecognizer *gR in self.pageViewController.gestureRecognizers)
{
gR.delegate = self;
}
You'll need to assign the viewController so it conforms to the UIGestureRecognizerDelegate and implement the method
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch (UITouch *)touch
{
return YES;
}
Now if you run the app and try to turn the page beyond the bounds, i.e. go to January and try to turn back so
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController
returns nil.
The app will then crash.
This did not happen with ios5. I need to assign the gestureRecognizer delegate to my viewController because I do not always want the pageViewController to handle the touch events.
Has any else experienced this or point out If I am doing something wrong?
Many Thanks Stewart.