How to maintain presenting view controller's orientation when dismissing modal view controller?

前端 未结 9 2097
礼貌的吻别
礼貌的吻别 2020-11-30 03:57

I have this app I am working on and I need ALL my view controllers but one to be in portrait. The single one view controller that is special I need it to be able to rotate t

9条回答
  •  一整个雨季
    2020-11-30 04:38

    In the root view controller, try adding:

    - (NSUInteger)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskPortrait;
    }
    

    Worked for me.

提交回复
热议问题