首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >beginGeneratingDeviceOrientationNotifications特性?

beginGeneratingDeviceOrientationNotifications特性?
EN

Stack Overflow用户
提问于 2012-02-02 16:14:49
回答 1查看 2K关注 0票数 1

beginGeneratingDeviceOrientationNotifications会将状态栏重置回纵向吗?

在我的应用程序中,登录o和p如下:

代码语言:javascript
复制
UIInterfaceOrientation o = [[UIApplication sharedApplication] statusBarOrientation];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
UIInterfaceOrientation p = [[UIApplication sharedApplication] statusBarOrientation];

我得到了:

代码语言:javascript
复制
o = UIInterfaceOrientationLandscapeRight
p = UIInterfaceOrientationPortrait

是我,还是这是意料之中的行为?这让我感到头疼的是,在我beginGeneratingOrientationNotifications之后,我的通知例程被连续调用了两次,一次是针对UIInterfaceOrientationPortrait,另一次是针对UIInterfaceOrientationLandscapeRight -这是iPhone在那个时刻的实际方向。

无论iPhone是如何保存的,在获得正确的通知之前,我都会收到一条UIInterfaceOrientationPortrait通知。

想法?

EN

回答 1

Stack Overflow用户

发布于 2012-03-07 17:56:14

在iphone上,应用程序以纵向模式启动,然后旋转到指定的方向。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9109020

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档