我正在为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
我使用这个代码在另一个案例在开关/案例块为其他模块,它也适用于iPad,这是我第一次有这个错误。
希望有人可以帮助我,提前谢谢。
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。