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

前端 未结 9 2120
礼貌的吻别
礼貌的吻别 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:18

    I'm having the same issue with an app and after days of experimentation I came up with a solution which is not very nice but it works for now. I'm using the delegate method application:supportedInterfaceOrientationsForWindow: within the appdelegate.

    I created a test project and put it here on github (including a GIF which shows the result...)

    // note: it's not in swift but I hope it helps anyways

提交回复
热议问题