The main UIViewController
(A) displays another UIViewController
(B) when the devices rotates to Landscape mode. So rotating the device to landscape while on A presents B modally and rotating back to portrait on B dismisses B and goes back to A.
While on B I want to push another UIViewController
(C) into A's stack. C can only be displayed in portrait though. I am aware that this goes against the HIG, as orientation should always be conserved between transitions.
So I want to be able to do the following on B:
- Dissmiss B
- Push C to A's stack (so popping from C goes back to A)
- Switch back to portrait orientation so C is displayed in portrait
If you have the Pay With Square app, you'll see that they solved this problem by fading in C (rotate the app to show the map and choose an annotation) but they didn't add it to the current stack, allowing only dismiss it.