我使用了创建我的项目Storyboards.根ViewController在里面Storyboard,我没有写过单个代码appDelegate.
现在,我想告诉我的应用程序的巡演,所以我想根本改变ViewController从Tab Bar我TourVC,当应用程序的游览结束后,我想我的根再次切换回ViewController至Tab Bar.
所以我在网上查询并遵循以下几点
1)Storyboards从app.plist文件中删除,2)取消选中"isInitialViewController"选项Storyboards,在Tab Bar控制器的情况下检查该选项,因为它是根ViewController,3)在appDelegate.m文件中添加此代码.
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
ProductTourViewController *PT = [[ProductTourViewController alloc] initWithNibName:@"ProductTourViewController" bundle:nil];
self.window.rootViewController = PT;
[self.window makeKeyAndVisible];
return YES;
Run Code Online (Sandbox Code Playgroud)
但我的应用程序崩溃与此错误日志,
[ProductTourViewController selectedViewController]: unrecognized selector sent to instance 0x1766a9e0
Run Code Online (Sandbox Code Playgroud)
我也收到警告,
Unsupported Configuration: Scene is unreachable due to lack of entry points and does not have an identifier for …Run Code Online (Sandbox Code Playgroud)