willRotateToInterfaceOrientation not being called

前端 未结 6 1146
暖寄归人
暖寄归人 2020-12-11 02:13

I\'m returning YES in my view controller\'s shouldAutorotateToInterfaceOrientation function, and I can see using breakpoints that YES

6条回答
  •  一整个雨季
    2020-12-11 02:33

    Apple documentation

    At launch time, apps should always set up their interface in a portrait orientation. After the application:didFinishLaunchingWithOptions: method returns, the app uses the view controller rotation mechanism described above to rotate the views to the appropriate orientation prior to showing the window.

    So if you are using a TabBarViewController be carefull to set up the selected view in the application:didFinishLaunchingWithOptions: method.

提交回复
热议问题