我试图NSWindowController在我的OS X应用程序中实例化一个故事板:
NSWindowController *mainWindowController = [[NSStoryboard storyboardWithName:@"Main" bundle:nil] instantiateControllerWithIdentifier:@"MainWindow"];
但这就是我得到的:
Storyboard (<NSStoryboard: 0x618000008500>) doesn't contain a controller with identifier 'MainWindow'.
但在故事板中:
它已经确定.不,没有其他故事板.是的,我已经尝试清理项目和构建文件夹,但没有任何变化.
为什么我会收到此错误?
更新:我正在构建我的应用程序,回到故事板,我发现故事板ID未设置:
故事板ID如何自行解除?