我正在以编程方式连接两个故事板视图控制器。我得到以下Assert:
*** Assertion failure in -[FullGalleryViewController loadView], /SourceCache/UIKit_Sim/UIKit-2380.17/UICollectionViewController.m:104
我的代码如下:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
FullScreenViewController *myVC = (FullScreenViewController *)[storyboard instantiateViewControllerWithIdentifier:@"FullScreenViewControllerId"];
[self presentViewController:myVC animated:YES completion:nil];
我已经把故事板的id设置为FullScreenViewControllerId
,我不知道我哪里做错了。
如何修复此错误?
1条答案
按热度按时间2ekbmq321#
示例化FullScreenViewController,Assert失败在FullGalleryViewController中。它不是同一个类。