[英]iOS6 rotation issue: make my view stick to portrait when pop back from another view controller
我有兩個ViewController,ViewControllerA同時支持橫向和縱向,在ViewControllerA中單擊一個按鈕,將其推入ViewControllerB(僅支持橫向),然后將手機沿橫向方向移動,然后彈回ViewControllerA,默認情況下A處於橫向模式,但在這種情況下,我希望它首先成為肖像。 我該如何實施?
在您的ViewControllerA
的viewwillappear
方法中,將方向設置為
[[UIDevice currentDevice]setOrientation:UIInterfaceOrientationPortrait];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.