xcode - How do I keep views locked into portrait mode, but still allow one view to rotate?

后端 未结 3 1594
遇见更好的自我
遇见更好的自我 2021-01-01 05:59

I\'m having a problem with device rotation. Except for ONE view, where I show a company splash screen, I want to lock all the remaining app views into Portrait display. In

3条回答
  •  抹茶落季
    2021-01-01 06:07

    Slap this method into the view controller you want locked in a certain orientation.

    -(NSUInteger)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskLandscape;
    }
    

    just change to the orientation you want (the above locks it in landscape)

提交回复
热议问题