how do I detect the iPhone orientation before rotating

后端 未结 7 1718
忘了有多久
忘了有多久 2020-12-28 09:32

In my program I\'m moving things based on rotation, but I\'m not rotating the entire view. I\'m Using :

  static UIDeviceOrientation previousOrientation = U         


        
相关标签:
7条回答
  • 2020-12-28 10:04

    Use this for the orientation of the UI if you need to determine what way are you pointing.

    Not 100% sure this is right but going off the top of my head:

    [[[UIApplication sharedApplication] statusBar] orientation]
    
    0 讨论(0)
提交回复
热议问题