I am using a custom transition to display modally a UIViewController which is inside a UINavigationController. I am using a zooming transition which starts with a smaller frame and ends with the UINavigationController full screen.
toView.transform = CGAffineTransformMakeScale(kInitialScale, kInitialScale);
[containerView addSubview:toView];
[UIView animateWithDuration:duration animations: ^{
toView.transform = CGAffineTransformMakeScale(1.0, 1.0);
} completion: ^(BOOL finished) {
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
My problem is that the UINavigationController is created with a navigation bar that does not take into account the status bar (smaller than it should be), and only adapts (from 44 to 64px) when it reaches its full screen size. The navigation title is offset at the end of the animation.
Any idea how to avoid that final offset of the title and create the navigation controller with the good navigation bar size from the beginning?