タグ

shouldAutorotateに関するedo_m18のブックマーク (1)

  • iOS 6 UINavigationControllerのAutorotate

    iOS6ではshouldAutorotateToInterfaceOrientation:メソッドが廃止され、代わりにsupportedInterfaceOrientationsメソッドとshouldAutorotateメソッドを使うようになっています。 ところが最初のViewControllerをUINavigationControllerにしているアプリでは、他のViewControllerにこれらのメソッドを実装しても有効になりません。(shouldAutorotateが呼ばれない。) このようなアプリの場合は次のようにすると回転を制御できるようになります。 UINavigationControllerのサブクラスを作り、起動時のUINavigationControllerのクラスをそれに替える。 上記サブクラスにsupportedInterfaceOrientationsメソッドと

    iOS 6 UINavigationControllerのAutorotate
  • 1