how do I detect the iPhone orientation before rotating

后端 未结 7 1773
忘了有多久
忘了有多久 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]
    

提交回复
热议问题