【发布时间】:2013-09-19 08:06:22
【问题描述】:
我遇到了以下问题。在我的 iPad 应用中使用情节提要。
-(UIViewController *)SetDetailVideoView
{
// assign/instantiate self. storyboard, but how?
VideosViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"VideoViewController"]; //empty but why? Because self.storyboard is empty
NSLog(@"%@",self.storyboard); //NULL
return vc;
}
Self.storyboard 返回 nil 所以它试图返回 nil 并给予豁免?
那么我如何实例化self.storboard。
【问题讨论】:
-
在情节提要类中检查您的标识符可能是您在 iPad 中设置了不同的标识符
-
检查并设置正确
-
你能展示你的实例化代码
self.storyboard
标签: xcode ipad storyboard instantiation