Application runs in landscape mode only.

If your application runs in landscape mode only, however, you must perform the following steps to make it launch in a landscape orientation initially.

  • In your application’s Info.plist file, add the UIInterfaceOrientation
    key and set its value to the
    landscape mode. For landscape
    orientations, you can set the value
    of this key to
    UIInterfaceOrientationLandscapeLeft
    or
    UIInterfaceOrientationLandscapeRight.
  • Lay out your views in landscape mode and make sure that their autoresizing options are set correctly.
  • Override your view controller’s shouldAutorotateToInterfaceOrientation: method and return YES only for the
    desired landscape orientation and NO
    for portrait orientations.
posted @ 2012-04-08 16:48  姜萌芽  阅读(230)  评论(0编辑  收藏  举报