【发布时间】:2015-11-03 07:47:05
【问题描述】:
我有一个奇怪的问题,我的应用程序处于横向模式。它在 iOS 8 中运行良好,但在 iOS 7 中,应用程序的第一个屏幕进入纵向模式。如果我推送到其他 viewController 并返回到第一个 vc,那么它会进入我想要的横向模式
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeRight;
}
【问题讨论】:
-
第一个屏幕初始化时你能检查帧的值吗?
标签: objective-c xcode ios7 orientation