문제

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