I am trying to load a storyboard file from a XIB file when a button is clicked. So in the IBAction
method I have called the following line:
我正在尝试在单击按钮时从XIB文件加载故事板文件。所以在IBAction方法中我调用了以下行:
- (IBAction)NextView:(id)sender
{
UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
[mainStoryBoard instantiateViewControllerWithIdentifier:@"StoryViewController"];
}
But I get this error when I run the application Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (<UIStoryboard: 0x88672d0>) doesn't contain a view controller with identifier 'StoryViewController''
但是由于未捕获的异常'NSInvalidArgumentException'而运行应用程序Terminating app时出现此错误,原因:'Storyboard( <0x88672d0>0x88672d0>