beginGeneratingDeviceOrientationNotifications会将状态栏重置回纵向吗?
在我的应用程序中,登录o和p如下:
UIInterfaceOrientation o = [[UIApplication sharedApplication] statusBarOrientation];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
UIInterfaceOrientation p = [[UIApplication sharedApplication] statusBarOrientation];我得到了:
o = UIInterfaceOrientationLandscapeRight
p = UIInterfaceOrientationPortrait是我,还是这是意料之中的行为?这让我感到头疼的是,在我beginGeneratingOrientationNotifications之后,我的通知例程被连续调用了两次,一次是针对UIInterfaceOrientationPortrait,另一次是针对UIInterfaceOrientationLandscapeRight -这是iPhone在那个时刻的实际方向。
无论iPhone是如何保存的,在获得正确的通知之前,我都会收到一条UIInterfaceOrientationPortrait通知。
想法?
发布于 2012-03-07 17:56:14
在iphone上,应用程序以纵向模式启动,然后旋转到指定的方向。
https://stackoverflow.com/questions/9109020
复制相似问题