disable autorotate on a single UIViewController in iOS6

前端 未结 5 1861
自闭症患者
自闭症患者 2020-12-01 06:43

I have a project using UINavigationController and segues working properly good, all of them rotate correctly, the thing is... I just want to disabl

5条回答
  •  执笔经年
    2020-12-01 07:33

    I see someone asked about this in Swift. It's not immediately obvious, since the Objective-C methods are not methods at all in Swift, but rather computed vars:

    override var shouldAutorotate: Bool { return false }
    override var supportedInterfaceOrientations: UIInterfaceOrientationMask { return .portrait }
    

提交回复
热议问题