2012-01-13 60 views
1

我目前正在开发一个应用程序,使用导航控制器的主要应用程序流。该应用程序包含一个场景(来自Storyboard),我希望使用PageViewController。PageViewController重叠NavigationItem和工具栏

这一切都很顺利,除了我想让网页的PAGE CURL EFFECT与导航项(顶部)和工具栏(底部)重叠。没有这个,页面卷曲效果就不那么有效了,因为页面卷曲看起来像导航镶边。

有什么建议吗?

回答

0

你可以尽量减少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}; 

的观点在appRect仍呈现,但pageviewcontroller在缩减边框呈现。

希望这会有所帮助!

亚伯拉罕