My app has the following configuration:
- root view controller only supports portrait orientation
- presented view controller supports both portrait and landscape
When presenting VC using default presentation all works as expected - user may rotate the device and presented VC rotates accordingly. After dismissal root VC still shows up in portrait without any unnecessary animations.
However, after switching to custom full screen presentation using UIPresentationController this behavior breaks.
First, the controller being presented completely ignores device rotation. As it turns out, -[UIPresentationController shouldRemovePresentersView] should return YES to make things work. Documentation states this method should be overriden for non-full screen presentations, so it's completely unclear why it affects the rotation in my case.
Second, after dismissing presented VC, presenting VC stays in current device orientation no matter what preferredInterfaceOrientationForPresentation return value is. The only "workaround" I have found so far is using -[UIDevice setOrientation:], but I would like to avoid using private API as much as possible.