Limit responsive areas for page curl transition

I am using View Transition Style "UIPageViewControllerTransitionStylePageCurl" to navigate books across multiple pages / views. Currently, the entire left and right side of the page - from top to bottom - "listen" to press or scroll gestures, resulting in page turns.

How can I constrain these sensitive areas to the very bottom left and bottom right areas of the screen (see the colored spots in the screenshot) to avoid conflicts with other buttons to be placed on the screen?

Screenshot

Here's my current UIPageViewController setup with a page script:

NSDictionary *options = [NSDictionary dictionaryWithObject:[NSNumber numberWithInteger:UIPageViewControllerSpineLocationMin] 
                                                    forKey:UIPageViewControllerOptionSpineLocationKey];

[self setPageController:[[UIPageViewController alloc]initWithTransitionStyle:UIPageViewControllerTransitionStylePageCurl
                                                       navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal
                                                                     options:options]];
[pageController setDataSource:self];
[[pageController view] setFrame:[[self view]bounds]];

RollViewController *rvc = [[RollViewController alloc]init];
NSArray *viewControllers = [NSArray arrayWithObject:rvc];

[pageController setViewControllers:viewControllers
                         direction:UIPageViewControllerNavigationDirectionForward
                          animated:NO
                        completion:nil];

[self addChildViewController:pageController];
[[self view]addSubview:[pageController view]];
[pageController didMoveToParentViewController:self];

      

+3


source to share





All Articles