我是Swift中的新手,並且在viewController中將方向鎖定爲縱向。其實我已經在我的自定義導航控制器swift中的viewController的鎖定方向
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
if (self.visibleViewController is ViewController)
{
return UIInterfaceOrientationMask.Portrait
}
return .All
}
一切使用此代碼鎖定它工作正常和視圖控制器被鎖定到portrait.The問題是,當返回到該控制器從另一個在橫向模式。 如果我在景觀中返回到ViewController(從NextViewController後退),那麼ViewController出現在橫向上。任何建議?
http://stackoverflow.com/a/20987296/1959140 在視圖做apprear,改變方向。 –