Search code examples
iosstatusbarscreen-rotation

Stop status bar from rotating when switching views on orientation


I have 2 views. A portrait detail view that when rotated to landscape, does a manual segue to a full screen photo viewer. The portrait detail view returns NO for shouldAutorotate and prefersStatusBarHidden.

When I rotate from portrait to landscape, just before the landscape view fades in, I can see the portrait view resize slightly as the status bar gets hidden and then the status bar moves from the top to the side.

The transition looks a bit ugly. I'd rather the status bar remains visible as the device is rotated to portrait, since it will get covered over by the landscape view anyway. Is it possible to do this?


Solution

  • I don't think this is possible. The only way I see it working is if you do the rotation yourself and not with the device ability