UIWindow's root view controller does not rotate to landscape at app launch

前端 未结 2 1273
小蘑菇
小蘑菇 2021-01-07 07:29

I am developing a xib-based landscape-only app. The app launches in landscape correctly. However, the view in my main ViewController is presented in portrait. That is, it is

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-07 08:22

    In iOS 8, settings windows frame to the UIScreen is also necessary, as it won't get automatically updated.

    self.window.frame = [UIScreen mainScreen].bounds;
    

提交回复
热议问题