It was a long day on the keyboard, so I turn to :-)
I have UIPageViewControllerin a typical implementation that basically matches Apple standard templates. I am trying to add an overlay that will allow the user to do something like clicking a button to go to certain pages or remove the view controller to go to another part of the application.
My problem is that it UIPageViewControllercaptures all the events from my overlay subclass, and I'm struggling to find a workable solution.
Here is sample code to help you ...
In the DidLoad view
self.pageViewController.delegate = self;
[self.pageViewController setViewControllers:pagesArray
direction:UIPageViewControllerNavigationDirectionForward
animated:NO
completion:NULL];
self.pageViewController.dataSource = self;
[self addChildViewController:self.pageViewController];
[self.view addSubview:self.pageViewController.view];
if (!self.overlay)
{
self.overlay = [[MyOverlayClass alloc] init];
[self.view addSubview:self.overlay];
}
. , UIPageViewController, . , - , .
UIButtons self.overlay . UIPageViewController .
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch .
UIPageViewController
- (, , ).
- , , , UIPageViewController.
!