加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – STORYBOARD EXCEPTION – 故事板不包含带有标识符的视图

发布时间:2020-12-15 02:04:06 所属栏目:百科 来源:网络整理
导读:我正在为iPhone和iPad开发iOS应用程序。我试图显示一个NavigationController来制作一个显示文件的模块。在iPhone的工作很好,但我不能让它在iPad上工作。 我收到以下错误: 'Storyboard (UIStoryboard: 0x919b200) doesn't contain a view controller with i
我正在为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,这是我第一次有这个错误。

希望有人可以帮助我,提前谢谢。

解决方法

我想出来,问题是故事板没有在设备上更新。

>从模拟器/ iPhone / iPad卸载应用程序
>产品>清洁
>建立&跑

正如在这个question年的@ T0m_Twt的回答中所说明的那样

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读