[英]Transitioning between multiple storyboards in XCode 4
I have not yet seen this question answered: 我还没有看到这个问题回答:
What is the best way to implement multiple storyboards in XCode 4? 在XCode 4中实现多个故事板的最佳方法是什么? An example of when you would want to do this might be in a team environment where multiple people are working on subsections of the same UI.
您希望这样做的一个示例可能是在团队环境中,其中有多个人正在处理同一UI的子部分。
Any ideas? 有任何想法吗? I might guess it has to be done manually in code but it would be neat if there were a way to do it graphically within the Storyboard editing view.
我可能会猜测它必须在代码中手动完成,但如果有一种方法可以在Storyboard编辑视图中以图形方式进行操作,那将会很简洁。
Here is a link to an example of using multiple storyboards and how to programmatically link multiple Storyboards: http://www.skillmasters.net/main/?p=193 以下是使用多个故事板的示例链接以及如何以编程方式链接多个Storyboard: http : //www.skillmasters.net/main/? p = 193
Here is the author's pertinent sample code: 以下是作者的相关示例代码:
UIStoryboard *settingsStoryboard = [UIStoryboard storyboardWithName:@"SettingsStoryboard" bundle:nil];
UIViewController *initialSettingsVC = [settingsStoryboard instantiateInitialViewController];
initialSettingsVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:initialSettingsVC animated:YES];
如果你想导航到特定的视图控制器,那么只需使用UIViewController * testVC = [(storyboard instance)instantiateViewControllerWithIdentifier:@“(Viewcontroller name)”];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.