views:

61

answers:

2

Hello,

How to check the orientation of device at any point off time programmatically in iPhone ?

Thank You.

+3  A: 

-[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.

JoostK
A: 

Try also:

UIInterfaceOrientationIsPortrait(orientation)

and

UIInterfaceOrientationIsLandscape(orientation)
AlexVogel