开发者

Not able to determine current orientation of device

开发者 https://www.devze.com 2023-04-11 19:22 出处:网络
I have a problem that [UIDevice currentDevice].orientation returns 0 in some cases. In my understanding this should never happen.

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 i开发者_JAVA技巧nstance variable that keeps track of every rotation and stores it?


I was having the same issue, and then came across this article:

Don't Rely On UIDevice Orientation For Rotation

I hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消