Note that there are some explanatory texts on larger screens.

plurals
  1. POContent pushed down in a UIPageViewController with UINavigationController
    text
    copied!<p><strong>UPDATE 2</strong></p> <p>I've been running and testing my app in the iOS Simulator using a 4-inch device. If I run using a 3.5-inch device the label doesn't jump. In my .xib, under Simulated Metrics, I have it set as Retina 4-inch Full Screen. Any idea why I'm only seeing this problem on a 4-inch device?</p> <p><strong>UPDATE 1</strong></p> <p>In IB, if I choose "Navigation Bar" in Simulated Metrics, my label still jumps. The only way I can get my label to render correctly on the first screen is to not set a navigation controller as my window's root view controller.</p> <p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p> <p>My window's rootViewController is being set to a UINavigationController whose rootViewController has a UIPageViewController embedded.</p> <p>When my app loads, the initial view is presented with it's content pushed down a bit, roughly the same size as a navigation bar. When I scroll the pageViewController, the content jumps up to where it was placed in the nib, and all other viewControllers loaded by the pageViewController are fine.</p> <p><img src="https://i.stack.imgur.com/fi2GK.png" alt="uipageviewcontroller with navigationcontroller"></p> <p>In my appDelegate:</p> <pre><code>self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[ContainerViewController new]]; </code></pre> <p>In ContainerViewController:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; self.pvc = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil]; self.pvc.dataSource = self; self.pvc.delegate = self; DetailViewController *detail = [DetailViewController new]; [self.pvc setViewControllers:@[detail] direction:UIPageViewControllerNavigationDirectionForward animated:false completion:nil]; [self addChildViewController:self.pvc]; [self.view addSubview:self.pvc.view]; [self.pvc didMoveToParentViewController:self]; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload