Application windows are expected to have a root view controller at the end of application launch occured

前端 未结 6 1319
轻奢々
轻奢々 2021-01-15 04:44

Getting the above error when my app launches. The following code is from my AppDelegate .h File

#import 

@interface TableViewAppDelegat         


        
6条回答
  •  南方客
    南方客 (楼主)
    2021-01-15 05:29

    If you started with an empty template and added a storyboard, you need to do a couple of things:

    • In project settings ->General, select your storyboard as the main interface

    • You also need to delete the following lines from YourAppDelegate.m

      self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
      // Override point for customization after application launch.
      self.window.backgroundColor = [UIColor whiteColor];
      [self.window makeKeyAndVisible];

提交回复
热议问题