【发布时间】:2015-02-20 13:54:14
【问题描述】:
目前我正在使用以下代码将视图控制器上的方向强制为横向。
NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight];
[[UIDevice currentDevice] setValue:value forKey:@"orientation"];
[UIViewController attemptRotationToDeviceOrientation];
这在 IOS 7.1 目标模拟器和我的 IOS 7.1 设备上运行良好。
当尝试将其用于 IOS 8.1 时,模拟器将物理地横向旋转,但视图将保持纵向。
是否有任何解决方法或其他旋转方式。
【问题讨论】:
标签: ios rotation orientation