【发布时间】:2012-03-03 07:46:06
【问题描述】:
我正在尝试以下方法:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
CustomVC *vc = [[CustomVC alloc] init];
vc = [storyboard instantiateViewControllerWithIdentifier:@"weddingDateViewController"];
[vc setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
[self vc animated:YES];
我在我的故事板中构建了一个视图控制器,并将一个自定义类链接到它(CustomVC)。当我运行此代码以呈现视图控制器时,屏幕会变黑,我什么也看不到。但是,在我的情节提要中,如果我删除指向我的自定义类的链接并运行此代码,它会正常淡入,并且我会看到我在情节提要中制作的视图控制器。
问题是我需要使用那个自定义类。这是一个全新的自定义类,没有对其进行任何更改。
【问题讨论】:
标签: iphone objective-c ipad uiviewcontroller storyboard