Rotation only in one ViewController

后端 未结 13 1903
我在风中等你
我在风中等你 2020-12-05 03:20

I am trying to rotate one view while all other views (5) are fixed to portrait. The reason is that in that one view I want the user to watch pictures which he saved before.

13条回答
  •  青春惊慌失措
    2020-12-05 03:58

    None of these answers worked for me. Fundamentally, AppDelegate's method does not allow specification on which viewController. So either the topMost ViewController is rotatable, in which case the whole view controller hierarchy gets rotated, or nothing gets rotated.

    However, I did find a promising answer in Child View Controller to Rotate While Parent View Controller Does Not

    It references https://developer.apple.com/library/archive/qa/qa1890/_index.html

提交回复
热议问题