title: Presenting a UINavigationController in a custom modal
body: <p>I'm trying to present a UINavigationController from a UINavigationController.  I'm using the new iOS 7 transitioningDelegate stuff and it's working great.... except the navigation bar starts out tall and then shrinks when the animation is over.  I'm assuming it shrinks because the bar doesn't touch the top of the screen, but why does it start out tall?  Can I prevent this?</p>
  
  <p><img src="https://i.stack.imgur.com/lzOKI.gif" alt="Notice the bar starts tall"></p>
  
  <p>Here's the animation code:</p>
  
  <pre><code>- (void)animateTransition:(id &lt;UIViewControllerContextTransitioning&gt;)transitionContext {
  
      UIViewController* fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
      UIViewController* toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
      UIView* containerView = [transitionContext containerView];
  
      if (toViewController.isBeingPresented) {
          [self presentModalView:toViewController.view fromView:fromViewController.view inContainerView:containerView withTransitionContext:transitionContext];
      } else {
          [self dismissModalView:fromViewController.view fromView:toViewController.view withTransitionContext:transitionContext];
      }
  }
  
  - (void)presentModalView:(UIView*)modalView fromView:(UIView*)presentationView inContainerView:(UIView*)containerView withTransitionContext:(id&lt;UIViewControllerContextTransitioning&gt;)transitionContext {
      [containerView addSubview:modalView];
      presentationView.userInteractionEnabled = NO;
  
      modalView.layer.cornerRadius = 5;
      modalView.clipsToBounds = YES;
  
      CGRect finalFrame = CGRectInset(presentationView.frame, 10, 20);
      modalView.frame = CGRectOffset(finalFrame, 0, CGRectGetHeight(presentationView.frame));
  
      [UIView animateWithDuration:animationDuration animations:^{
          modalView.frame = finalFrame;
          presentationView.alpha = 0.2;
      } completion:^(BOOL finished) {
          [transitionContext completeTransition:YES];
      }];
  }
  </code></pre>