iOS6: supportedInterfaceOrientations not working (is invoked but the interface still rotates)

前端 未结 15 668
野趣味
野趣味 2020-11-29 04:09

In my app I have multiple views, some views need to support both portrait and landscape, while other views need to support portrait only. Thus, in the project summary, I ha

15条回答
  •  囚心锁ツ
    2020-11-29 04:24

    If your are using a UINavigationController as the root window controller, it will be its shouldAutorotate & supportedInterfaceOrientations which would be called.

    Idem if you are using a UITabBarController, and so on.

    So the thing to do is to subclass your navigation/tabbar controller and override its shouldAutorotate & supportedInterfaceOrientations methods.

提交回复
热议问题