TheLittleBoy / HXRotationTool

iOS 屏幕旋转工具类,兼容iOS 16,兼容Xcode 13和Xcode 14。
MIT License
26 stars 8 forks source link

AppDelegate中supportedInterfaceOrientationsForWindow 给控制器返回不触发的问题 #3

Open kanluo91 opened 3 months ago

kanluo91 commented 3 months ago
  1. 如果Root是UITabBarController 的情况, appDelegate 中的方向给子控制去控制

image

  1. 添加UITabBarVC的Categoty 和 UINavigationController的Category 没触发supportedInterfaceOrientations 方法是为是啥

  2. 进入页面直接横屏怎么操作?

TheLittleBoy commented 3 months ago

主要是为了把supportedInterfaceOrientations控制权交给当前窗口最顶端的VC,而不是被UITabBarVC或UINavigationController自己拦截掉。

进入页面直接横屏怎么操作?我建议你用presentViewController:

另外,联机调试时的效果可能不是你所期望的那样,建议重启APP看效果。