本文介绍了目标C:从广告连播/框架中加载情节提要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试加载Pod中.storyboard中的视图控制器。我正在使用通常可以正常工作的以下内容:

I'm trying to load a view controller that's in a .storyboard in a pod. I'm using the following which normally works:

UIStoryboard *storyboard = [UIStoryboard
storyboardWithName:@"StoryboardName" bundle:nil];
NewViewController *newView = [storyboard instantiateViewControllerWithIdentifier:@"NewViewController"];
[self.navigationController pushViewController:newView animated:YES];

我需要将其更改为什么以便可以从吊舱中装载?

What do I need to change it to so I can load from a pod?

推荐答案

您应使用其包标识符

NSBundle* bun = [NSBundle bundleWithIdentifier:"id"]

UIStoryboard *storyboard = [UIStoryboard   storyboardWithName:@"StoryboardName" bundle:bun];

这篇关于目标C:从广告连播/框架中加载情节提要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 08:34