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 :
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.
您可以像平常一样推动视图控制器,然后在viewDidAppear中使用此线程中的一些代码来旋转视图。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.