0
我正在研究iOS應用程序,其中所有ViewController僅支持縱向方向,除了一個支持縱向和橫向的ViewController。我試試這個代碼的那個ViewController支持ios,swift中特定視圖控制器的橫向和縱向設備方向3
override var shouldAutorotate: Bool {
return false
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return .landscapeLeft
}
override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
return .landscapeLeft
}
但這沒有工作,任何人都可以幫助嗎? 感謝
它的作品,非常感謝的人 – DevMhd