1

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.

Hariprasad
  • 1,094
  • 2
  • 12
  • 30

1 Answers1

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

Community
  • 1
  • 1
visakh7
  • 26,380
  • 8
  • 55
  • 69