Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I detect if UI orientation is locked or not on iOS?

Is it possible to detect UI orientation is locked or not currently? If so, how can I do that?

I want to do something with gravity sensor when only UI orientation is not locked.

like image 259
eonil Avatar asked Jul 13 '11 11:07

eonil


People also ask

Which method called when orientation changes IOS?

This inherited UIViewController method which can be overridden will be trigger every time the interface orientation will be change. Consequently you can do all your modifications in the latter. By implementing this method you'll then be able to react to any change of orientation to your interface.


1 Answers

Not possible unfortunately, the lock is handled by the OS and is transparent to the app.

like image 158
adam Avatar answered Oct 05 '22 23:10

adam