iOS 8: Autorotation is not working without storyboard

前端 未结 5 754
清歌不尽
清歌不尽 2021-01-14 06:28

So I am trying to start a project w/o Storyboards and I can\'t seem to figure out why the UIWindow is not passing autorotation commands to the root view controller. With st

5条回答
  •  再見小時候
    2021-01-14 06:37

    Are you using storyboards? If so, you may have old code in your application didFinishLaunchingWithOptions method.

    Try removing the following line of code and any others to do with UIWindow:

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    Just need to remove above line from AppDelegate.m file.

提交回复
热议问题