Ios5 PageViewController重叠导航项和工具栏

Ios5 PageViewController重叠导航项和工具栏,ios5,navigationitem,Ios5,Navigationitem,我目前正在开发一个应用程序,使用导航控制器作为主应用程序流。该应用程序包括一个场景(来自故事板),我希望在其中使用PageViewController 一切都很顺利,只是我想让页面的页面卷曲效果与导航项(在顶部)和工具栏(在底部)重叠。如果没有这一点,页面卷曲效果就不会那么有效,因为页面卷曲似乎位于导航浏览器后面 有什么建议吗?您可以尝试缩小pageviewcontroller的框架: // Establish the page view controller CGRect appRect =

我目前正在开发一个应用程序,使用导航控制器作为主应用程序流。该应用程序包括一个场景(来自故事板),我希望在其中使用PageViewController

一切都很顺利,只是我想让页面的页面卷曲效果与导航项(在顶部)和工具栏(在底部)重叠。如果没有这一点,页面卷曲效果就不会那么有效,因为页面卷曲似乎位于导航浏览器后面


有什么建议吗?

您可以尝试缩小pageviewcontroller的框架:

// Establish the page view controller
CGRect appRect = [[UIScreen mainScreen] applicationFrame];
pageController = [PageViewController pageViewWithDelegate:self];
CGRect reducedFrame = CGRectMake(appRect.origin.x, appRect.origin.y, appRect.size.width, (appRect.size.height - 44)); // here is the the reduction set for the toolbar of height 44
pageController.view.frame = (CGRect){.size = reducedFrame.size}; 
视图仍显示在Appect中,但pageviewcontroller显示在缩小的帧中

希望这有帮助

亚伯拉罕