在新頁面的 viewDidLoad 中執行:ide
UIDevice.currentDevice().setValue(UIInterfaceOrientation.LandscapeRight.rawValue, forKey: "orientation")函數
將 SecondViewController 中的函數改成:spa
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {orm
return UIInterfaceOrientationMask.Allit
}io
override func preferredInterfaceOrientationForPresentation() -> UIInterfaceOrientation {margin
return UIInterfaceOrientation.LandscapeLefttop
}di