View Full Version : UIInterfaceOrientation kinda works...
fixie rider
Oct 9, 2008, 03:56 PM
I'm trying to get my app to only work in landscape mode only. The UIInterfaceOrientation key seems to work fine on my device, but weird things happen in the simulator. It will start in landscape and then flip to portrait automatically.
Can anyone else confirm this?
SqueegyX
Oct 9, 2008, 04:13 PM
Apple recommends running it in portrait mode and just rotating the views.
http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationEnvironment/chapter_6_section_5.html#//apple_ref/doc/uid/TP40007072-CH7-SW18
Working great in my OpenGL game.
fixie rider
Oct 9, 2008, 05:04 PM
Apple recommends running it in portrait mode and just rotating the views.
Working great in my OpenGL game.
Yeah. It seems to work fine, but I'll just do a rotate to be consistent. Thanks.
jasonslater
Oct 10, 2008, 11:06 AM
I've managed to get this to work by adding this into my AppDelegate class (in the applicationDidLoad function):
[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated: YES];
And then rotate each of the views
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.