Launching into portrait-orientation from an iPhone 6 Plus home screen in landscape orientation results in wrong orientation

前端 未结 13 1566
南方客
南方客 2020-12-22 23:21

The actual title for this question is longer than I can possibly fit:

Launching an app whose root view controller only supports portrait-orientation but which otherw

13条回答
  •  生来不讨喜
    2020-12-22 23:43

    I got same bug on my app, I figured it out with this solution

    Firstly it didn't work but after some dig I have to do it on initial controller after splash screen.

    Answer is OjbC language let me update it to Swift

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

    Don't forget that should on the initial view controller.

提交回复
热议问题