سؤال

I have done a separate project using storyboard.

I need to integrate with an existing big project which doesn't use storyboard.

Is it possible to use storyboard partly (only for some view controllers)? If so how ?

هل كانت مفيدة؟

المحلول

Sure. You can instantiate separate view controllers from storyboard:

Getting a Storyboard Object

+ storyboardWithName:bundle:

Instantiating Storyboard View Controllers

– instantiateInitialViewController
– instantiateViewControllerWithIdentifier:

For ex:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
YourViewController *yourVC = [storyboard instantiateViewControllerWithIdentifier:@"yourViewControllerIdentifier"];

نصائح أخرى

Yes. It is possible. Any view controllers that aren't on the storyboard are presented in exactly the same way they were in the old projected, by instantiating, setting properties (if need be), and pushing.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top