我使用通知来获取设备的方向。
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[notificationCenter addObserver:self
selector:@selector(deviceOrientationDidChange)
name:UIDeviceOrientationDidChangeNotification
object:nil];
但是当设备的屏幕旋转被锁定时,选择器函数不会被调用。有什么帮助吗?
最佳答案
关于iphone - 屏幕旋转锁定时如何获取设备方向?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13509257/