限制页面卷曲转换的响应区域

时间:2012-03-30 22:57:04

标签: ios uipageviewcontroller

我正在使用View Transition Style“UIPageViewControllerTransitionStylePageCurl”来浏览多个页面/视图中的书籍。目前页面的整个左侧和右侧 - 从上到下 - “收听”轻击或滑动手势导致翻页。

如何将这些响应区域限制在屏幕的左下角和右下角区域(请参见屏幕截图中的彩色斑点),以避免与屏幕上的其他按钮发生冲突?

Screenshot

这是我目前使用页面卷曲的UIPageViewController的设置:

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];

0 个答案:

没有答案