1
  • (NSUInteger)supportedInterfaceOrientations 没有在我在项目的 UIViewController 中使用过的自定义框架中被调用,而在单独的项目中它工作正常并且被正确调用

    • (BOOL)shouldAutorotate { 返回 YES; }

    • (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; }

    • (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationPortrait; }

有没有办法通过项目中的自定义框架调用它?

4

1 回答 1

0

发生这种情况有不同的原因。一旦检查这个。在此处输入图像描述

在设备中检查 iPad 和 iPhone 方向并仅选择纵向。然后委托方法将调用。

于 2018-11-22T09:39:30.363 回答