Hello,
How to check the orientation of device at any point off time programmatically in iPhone ?
Thank You.
Hello,
How to check the orientation of device at any point off time programmatically in iPhone ?
Thank You.
-[UIViewController interfaceOrientation]
However it is possible to retrieve the deviceOrientation, independent from the current interface orientation:
[[UIDevice currentDevice] orientation]
Read the documentation for more information though, you need to do some more things to make that work.
Try also:
UIInterfaceOrientationIsPortrait(orientation)
and
UIInterfaceOrientationIsLandscape(orientation)