看起来Xcode 5没有选择使用我的iPad故事板,即使我已经指定了它。以下是我告诉Xcode 5使用iPad故事板的方法:
1.在“通用”下,进入项目设置 2.选择设备:“Universal” 3.然后单击“iPad” 4.在“Main Interface”中写入“MainStoryboard-iPad.storyboard”
但是,由于某种原因,即使我更改了“MainStoryboard-iPad”故事板,当我尝试在iPad上运行它时仍未显示出来。
我的项目中只有两个故事板:“MainStoryboard-iPad.storyboard”和“MainStoryboard.storyboard”。
有什么想法吗?
顺便说一句,第一次选中通用时,我得到了一个关于复制的提示框(我没有仔细阅读)。我只是按了“是”。不确定该框实际上做了什么。
编辑:
AppDelegate.m中的代码:
1.在“通用”下,进入项目设置 2.选择设备:“Universal” 3.然后单击“iPad” 4.在“Main Interface”中写入“MainStoryboard-iPad.storyboard”
但是,由于某种原因,即使我更改了“MainStoryboard-iPad”故事板,当我尝试在iPad上运行它时仍未显示出来。
我的项目中只有两个故事板:“MainStoryboard-iPad.storyboard”和“MainStoryboard.storyboard”。
有什么想法吗?
顺便说一句,第一次选中通用时,我得到了一个关于复制的提示框(我没有仔细阅读)。我只是按了“是”。不确定该框实际上做了什么。
编辑:
AppDelegate.m中的代码:
- (void)applicationDidBecomeActive:(UIApplication *)application {
AppDelegate *app = [[UIApplication sharedApplication] delegate];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *ivc = [storyboard instantiateViewControllerWithIdentifier:@"mainStoryBoard"];
UINavigationController *nvc = (UINavigationController*)self.window.rootViewController;
app.window.rootViewController = ivc;
}