我正在使用 UISplitViewController
制作应用程序,但它需要在 iPad 中的纵向模式下仅显示 MasterViewController
(与 iPhone 上的纵向模式相同)。横屏模式下正常工作。
请给我一些想法来实现它。提前致谢。
最佳答案
将其放入viewWillAppear
NSNumber *value = [NSNumber numberWithInt: UIInterfaceOrientationMaskPortrait];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
关于ios - 如何使用 UISplitViewController iOS 在 iPad 上强制以纵向模式显示 MasterViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38157247/