当应用程序被激活时,我正在创建一个文件。基于该文件的存在,加载不同的视图。
我正在尝试的是
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Add the view controller's view to the window and display.
if(condition true)
{
//[window addSubview:viewController.view];
[self.window setRootViewController:viewController];
[window makeKeyAndVisible];
return YES;
}else{
//[window addSubview:signViewController.view];
[self.window setRootViewController:secondViewController];
[window makeKeyAndVisible];
return YES;
}
// return YES;
}
我得到的错误是Application windows are expected to have a root view controller at the end of application launch