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

后端 未结 30 2090
野的像风
野的像风 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条回答
  •  猫巷女王i
    2020-11-22 07:27

    I had this same error message in the log. I had a UIAlertView pop up in application:didFinishLaunchingWithOptions. I solved it by delaying the call to the alertView to allow time for the root view controller to finishing loading.

    In application:didFinishLaunchingWithOptions:

    [self performSelector:@selector(callPopUp) withObject:nil afterDelay:1.0];
    

    which calls after 1 second:

    - (void)callPopUp
    {
        // call UIAlertView
    }
    

提交回复
热议问题