【发布时间】:2025-12-17 05:25:01
【问题描述】:
我正在从故事板显式加载视图控制器并拥有以下代码:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
UIViewController *initViewController = [storyboard instantiateViewControllerWithIdentifier:@"InitialScreen"];
但我收到错误“'Storyboard () 不包含标识符为 'InitialScreen' 的视图控制器”
从截图中可以看出,视图控制器确实具有该标识符。我之前成功地使用过这种相同的加载控制器的方式,但不知道为什么这次它不起作用。任何想法可能是什么问题?
【问题讨论】:
标签: ios storyboard