UIDevice Orientation

前端 未结 8 1523
忘了有多久
忘了有多久 2020-12-13 07:34

I have the following code in a method. When I run this in the simulator the debugger skips right over the code?? What am I missing?

if (([[UIDevice currentDe         


        
8条回答
  •  温柔的废话
    2020-12-13 08:21

    Heh you need to call [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications] before obtaining the value. Have a look at documentation of this method. Took me a while to track this down.

提交回复
热议问题