我有这段代码可以转换到另一个视图控制器(我想以编程方式执行此操作,因为该应用程序有许多彼此连接的视图控制器):
UIViewController *homeViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"HomeViewController"];
[self presentViewController:homeViewController animated:0 completion:nil];
我还在情节提要文件Storyboard ID
中将 viewController设置为HomeViewController
。
当我运行它时,我收到错误:'Storyboard (<UIStoryboard: 0x712af50>) doesn't contain a view controller with identifier 'HomeViewController''
为什么我会收到此错误?