how do I detect the iPhone orientation before rotating

后端 未结 7 1771
忘了有多久
忘了有多久 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 09:57

    Depending on your circumstances, a simpler option may be the interfaceOrientation property of the UIViewController class. This is correct before a rotation.

提交回复
热议问题