包括一个iOS Storyboard项目到另一个?

我和其他人在同一个项目中工作,但分开工作。 想象一下,第一个人用UITableViewController创build一个Storyboard项目。 第二个想要在他自己的Storyboard项目中包含前一个元素。 我如何连接这两个Storyboard项目?

谢谢

我有一个解决scheme:只要适当地创build一个属性或variables。 例如:

@property (strong, nonatomic) UIStoryboard * storyboard1; @property (strong, nonatomic) UIStoryboard * storyboard2; ..... .m -(void)initMyStoryboards{ storyboard1 = [UIStoryboard storyboardWithName:@"storyboard1" bundle:nil]; storyboard2 = [UIStoryboard storyboardWithName:@"storyboard2" bundle:nil]; } -(void)launchViewFromS1{ //use view in storyboard1 MyViewController1 *myViewController = [self.storyboard1 instantiateViewControllerWithIdentifier:@"MainView"]; .... } -(void)launchViewFromS2{ //use view in storyboard2 MyViewController2 *myViewController2 = [self.storyboard2 instantiateViewControllerWithIdentifier:@"OtherView"]; .... } 

其他例如:

 -(void)launchMyView{ UIStoryboard * storyboard = [UIStoryboard storyboardWithName:@"storyboard1" bundle:nil]; ViewController1 *myViewController =[storyboard instantiateViewControllerWithIdentifier:@"MainView"]; .... }