【发布时间】:2014-08-21 19:49:07
【问题描述】:
我目前正在为 iPhone 和 iPad 开发一个 iOS 应用程序。我试图展示一个 NavigationController 来制作一个显示文件的模块。在 iPhone 上它工作得很好,但我不能让它在 iPad 上工作。
我收到以下错误:
'Storyboard (<UIStoryboard: 0x919b200>) doesn't contain a view controller with identifier 'FilesNavigation''
这是代码:
case 10: // Files
{
UINavigationController *navigationController = [storyboard instantiateViewControllerWithIdentifier:@"FilesNavigation"];
FilesViewController *filesViewController = [storyboard instantiateViewControllerWithIdentifier:@"Files"];
[navigationController pushViewController:filesViewController animated:YES];
self.slidingViewController.topViewController = navigationController;
break;
}
在我的故事板中,我已经为导航控制器设置了故事板 ID。
>##Custom Class
>Class: UINavigationController
>##Identity
>Storyboard ID: FilesNavigation
我将此代码用于其他模块的 switch/case 块上的另一个案例,它也适用于 iPad,这是我第一次遇到此错误。
【问题讨论】:
-
请添加一个屏幕截图,显示您的故事板属性的外观
-
我没有足够的声望,无法添加截图。
标签: ios xcode storyboard