how to support landscape/Portrait orientation only for one UIView

后端 未结 1 1736
暗喜
暗喜 2021-01-27 16:20

I\'m having 5 view controllers in my navigation based application, I need to support both landscape/Portrait mode in only a one view, following items displaying in the view Navi

1条回答
  •  囚心锁ツ
    2021-01-27 17:18

    You should use shouldAutorotateToInterfaceOrientation in your view controller, and return YES for view controllers that should support both Landscape/Portrait

    http://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instm/UIViewController/shouldAutorotateToInterfaceOrientation:

    0 讨论(0)
提交回复
热议问题