Wednesday, July 15, 2009

Easy iPhone landscape orientation

Put one of the following in your AppDelegate's applicationDidFinishLaunching method:
  • application.statusBarOrientation = UIInterfaceOrientationLandscapeRight;
  • application.statusBarOrientation = UIInterfaceOrientationLandscapeLeft;

This has several benefits:
  • The status bar, keyboard, and alerts are oriented properly
  • The iPhone simulator will orient itself properly

No comments: