【发布时间】:2011-12-12 21:54:25
【问题描述】:
当我在 iPad 模拟器中使用 didLoad 或 willAppear 中的以下方法时,为什么设备总是认为它处于横向模式,而它显然是纵向的。
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
NSLog(@"orientation - %i", UIInterfaceOrientationIsPortrait(orientation));
这在 iPhone 模拟器中运行良好,还有其他方法可以找出设备的方向吗?
我尝试在 app.plist 中添加支持的方向,但模拟器仍然认为它处于横向模式?
干杯,
【问题讨论】:
标签: objective-c ipad orientation