[英]How to get device orientation when the screen rotation is locked?
I used the notification to get the device's orientation.我使用通知来获取设备的方向。
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[notificationCenter addObserver:self
selector:@selector(deviceOrientationDidChange)
name:UIDeviceOrientationDidChangeNotification
object:nil];
But the selector function is not called when the device's screen rotation is locked.但是当设备的屏幕旋转被锁定时,不会调用选择器函数。 Any help?
有什么帮助吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.