문제

To move between VCs on a single storyboard, I use the first custom segue from the post : bidirectional storyboard travel without stacking This replaces the window's root view controller with the destination view controller, so the VCs do not stack and cause memory allocation issues.

I need to use multiple storyboards and so I am after a method of moving to a second storyboard that replaces the windows root controller with the initial VC of the new storyboard (I.e in a similar way to the custom segue I have used throughout the rest of the project.)

The solution should ideally work for IOS6 & IOS7 (the pseudo-segue method has been updated to IOS7 only)

Any ideas?

도움이 되었습니까?

해결책

You can't do this with a segue. Segues can only be made between controllers in the same storyboard. The only way to do this, is in code by instantiating that first controller, and setting it as the window's root view controller.

UIStoryboard *sb = [UIStoryboard storyboardWithName:@"SomeOtherStoryboard" bundle:nil];
NewController *new = [sb instantiateInitialViewController];
self.view.window.rootViewController = new;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top