Applications are expected to have a root view controller at the end of application launch

后端 未结 30 2085
野的像风
野的像风 2020-11-22 06:42

I get the following error in my console:

Applications are expected to have a root view controller at the end of application launch

30条回答
  •  半阙折子戏
    2020-11-22 07:28

    None of the above suggestions solved my problem. Mine was this:

    Add:

    window.rootViewController = navigationController;
    

    after:

    [window addSubview:navigationController.view];
    

    in my appdelegate's

    - (void)applicationDidFinishLaunching:(UIApplication *)application {
    

提交回复
热议问题