Hello I am wondering if it is possible to change the orientation of the interface through code in iPhone/iPad.i.e,for example i have a button.if i click on that my interface orientation should change.if it is possible please help me how to do.
Asked
Active
Viewed 1,248 times
1 Answers
4
Pls go through this
Is there a documented way to set the iPhone orientation?
There is an undocumented property setter on UIDevice that does the trick but obviously generates a compiler warning and could disappear with a future revision of the SDK.
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait];
Another link Forcing UIInterfaceOrientation changes on iPhone which may help you
-
1these are the compiler warnings that lead directly into rejection. – Matthias Bauch Mar 22 '11 at 13:09