ViewController won't rotate when modally presenting another VC

Hi,

I have a view controller (root) that modally presents another view controller (detail). When I rotate the device and then dismiss the view controller, the layout of the root view controller is broken, i.e. does not fit the bounds of the screen. However, when I wrap the detail view controller in a navigation controller, everything works correctly.


What is UINavigationView controller doing that my own view controller should do, too, in order to make the root view controller rotate in the background, or update itself before the dismissal animation happens?


I'm not using storyboards by the way.

Hi Johannes


If you pause your app (in the debugger) after dismissing the modal view controller and run the command `(lldb) po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]`, what is the output?

ViewController won't rotate when modally presenting another VC
 
 
Q