찾다

 >  Q&A  >  본문

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일 전462

모든 응답(1)나는 대답할 것이다

  • 黄舟

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

    확실히 메인인가요? 메인 아님?

    회신하다
    0
  • 취소회신하다