无法确定设备的当前方向
我遇到的问题是 [UIDevice currentDevice].orientation
在某些情况下返回 0。根据我的理解,这永远不应该发生。
它甚至不在启动时。我现在是否必须创建自己的实例变量来跟踪每次旋转并存储它?
I have a problem that [UIDevice currentDevice].orientation
returns 0 in some cases. In my understanding this should never happen.
It's not even at startup. Do I now have to create my own instance variable that keeps track of every rotation and stores it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,然后遇到了这篇文章:
不要依赖 UIDevice 方向进行旋转
我希望有所帮助。
I was having the same issue, and then came across this article:
Don't Rely On UIDevice Orientation For Rotation
I hope that helps.