在iOS中的多窗口中自动旋转

时间:2021-08-18 11:44:25

I'm building a library in which I'm creating a window and then attaching my own view controller (subclass of UIViewController class) to it. Now I need to use it in a test application. Now when I'm trying to rotate this screen on changing the orientation, it is not happening as my own view controller is not getting the shouldAutoRotateOnOrientaionChange notification. How to solve this problem?

我正在构建一个库,我正在创建一个窗口,然后将自己的视图控制器(UIViewController类的子类)附加到它。现在我需要在测试应用程序中使用它。现在当我尝试在更改方向时旋转此屏幕时,它不会发生,因为我自己的视图控制器没有获得shouldAutoRotateOnOrientaionChange通知。如何解决这个问题呢?

1 个解决方案

#1


0  

Set the Supported Device Orientations in the Summary tab of your target's settings.

在目标设置的“摘要”选项卡中设置“支持的设备方向”。

#1


0  

Set the Supported Device Orientations in the Summary tab of your target's settings.

在目标设置的“摘要”选项卡中设置“支持的设备方向”。