title: iOS 8 UIPageViewController Applying Constraints After Transitions
body: <p>My app has a multi-pane tutorial-style view that users swipe through to learn about the app. This is implemented very much as <a href="http://www.appcoda.com/uipageviewcontroller-tutorial-intro/">described in this tutorial</a>. Having implemented it for both iOS 7 and 8, I'm comparing how they work, and finding issues with the latter — I'm running Xcode 6 GM here.</p>
  
  <p>It seems that the UIPageViewController is rendering the views after the transition is complete. I overrode the delegate methods to see what was going on:</p>
  
  <pre><code>- (void)pageViewController:(UIPageViewController *)pageViewController willTransitionToViewControllers:(NSArray *)pendingViewControllers
  {
     NSLog(@"Frame size before: %@", NSStringFromCGRect([(UIViewController*)pendingViewControllers[0] view].frame));
  }
  
  - (void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)previousViewControllers transitionCompleted:(BOOL)completed
  {
     NSLog(@"Frame size after: %@", NSStringFromCGRect([(UIViewController*)previousViewControllers[0] view].frame));
  }
  </code></pre>
  
  <p>And here's a sample output:</p>
  
  <pre><code>Frame size before: {{0, 0}, {600, 600}}
  Frame size after: {{0, 0}, {320, 568}}
  </code></pre>
  
  <p>This manifests like so: swipe to the left to pull in the next view, and note a 32-pt white space at the bottom of the new view. Once the transition is complete, it jerks into its proper layout.</p>
  
  <p>Is this a bug in iOS 8, perhaps? I'm all out of guesses at this point.</p>