我有一個應用程序,其中一些屏幕應處於肖像模式,其中一些應處於橫向模式。例如,主菜單是肖像,並有一個照相機按鈕。相機只能在風景中使用。我正在使用Storyboard和NavigationController。我應該怎樣做才能做到這一點?使用Swift將方向設置爲肖像
我已經嘗試過包括
shouldAutorotate() -> Bool {return false or return true}
既不工作。我已經爲每個viewcontroller設置了
supportedInterfaceOrientation
。沒什麼幫助。我需要一個可調用的功能來強制屏幕進入橫向/縱向模式。
這裏已經回答[答案](http://stackoverflow.com/questions/26357162/how-to-force-view-controller-orientation-in-ios-8) – MacKentoch
這兩種解決方案都沒有e爲我工作。 :( – MegaX