【发布时间】:2013-04-16 21:15:05
【问题描述】:
我在主细节方面遇到问题我知道 masterDetail 需要成为情节提要中的初始 ViewController 并且我想在按下按钮时制作一个 MENU 我加载了MasterDetail...
我到目前为止所尝试的:
我将MENU ViewController 放在storyBoard 中,例如MENU.storyboard
MasterDetail viewController 在另一个名为 MainStory.storyboard 的 StoryBoard 中
然后从构建阶段我选择storyBoard的主要条目是MENU
最后在MENU 类(例如MenuClass.m)中为按钮添加操作
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStory" bundle:nil];
MyNewViewController *myVC = [storyboard instantiateViewControllerWithIdentifier:@"myViewCont"];
然后添加这个视图。
问题是:当我在 iphone StoryBoard 中执行此步骤时,它可以完美运行。 但是,当我在 iPad StoryBoard 中执行相同的简单步骤时,代码崩溃(甚至在 MENU storyBoard 中显示之前)...... 当我在
中评论代码时- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions ->appDelegate
菜单 StoryBoard 出现,但是当按下按钮加载 MasterDetail 时我遇到了崩溃 当然是因为我在appDelegate中注释了MasterDetail初始化代码。
【问题讨论】:
标签: ios