suchen

Heim  >  Fragen und Antworten  >  Hauptteil

ios - Could not find a storyboard named 'main' in bundle NSBundle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //创建窗口
    self.window =[[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    //加载main.storyboard 创建控制器
    UIStoryboard * stotyboard=[UIStoryboard storyboardWithName:@"main" bundle:nil];
    //1.加载箭头指向的控制器
    UIViewController *vc = [stotyboard instantiateInitialViewController];
    
    
    //设置跟控制器
    self.window.rootViewController=vc;
    
    //显示窗口
    [self.window makeKeyAndVisible];
    return YES;
}
怪我咯怪我咯2771 Tage vor463

Antworte allen(1)Ich werde antworten

  • 黄舟

    黄舟2017-04-18 09:45:33

    确定是main?不是Main?

    Antwort
    0
  • StornierenAntwort