Include iOS storyboard project in another?

I and other people work in the same project, but separately. Imagine the first person creating a Storyboard project using the UITableViewController. The second wants to include the previous item in his own Storyboard project. How can I connect these two Storyboard projects?

thank

0
ios objective-c xcode storyboard
Jan 06 2018-12-12T00:
source share
1 answer

I have one solution: just create a property or variable if necessary. For example:

@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"]; .... } 

another example:

 -(void)launchMyView{ UIStoryboard * storyboard = [UIStoryboard storyboardWithName:@"storyboard1" bundle:nil]; ViewController1 *myViewController =[storyboard instantiateViewControllerWithIdentifier:@"MainView"]; .... } 
+1
Mar 20 2018-12-12T00:
source share



All Articles