I have a UIPageViewController subclass that displays 1 view controller at a time. The displayed view controller has a scrollview. This allows the user to scroll left/right to go to a new page, or up down to view content larger than the screen's height. The UIPageViewController subclass is embedded within a UINavigationController, and the navBar's toolbar is visible.
This UIPageViewController subclass can be accessed from two different parts of my app.
In my first viewController, the toolbar is hidden. Tapping on an element in this view controller loads the UIPageViewController, and everything looks fine.
In my second viewController, the toolbar is visible. Tapping on an element in this view controller loads the UIPageViewController, but my content (the pageViewController's viewController) is pushed down a bit from the navigation bar. As soon as I interact with the scrollView though, the view automatically adjusts to correctly sit right below the nav bar.
I am running this on iOS7, but I'm not sure if that has any relation.
Why is my view controller loading differently when coming from two different parts of the app, one with the toolbar showing, one with it hidden?
If your app works well on iOS6, but not on iOS7, try to set NO to UIPageViewController(UIPVC)'s automaticallyAdjustsScrollViewInsets property.
UIPVC seems to have a scrollview inside. On iOS7, UIViewController's automaticallyAdjustsScrollViewInsets property is set to YES in default. I think it doesn't work well if it is embedded in UINavigationController.
In my case, I created custom UIPVC and place the following code in [viewDidLoad] method.
self.automaticallyAdjustsScrollViewInsets = NO;