Reputation: 3249
I have a navigation controller based iPad application. I am using storyboards for the app design. From one of the ViewControllers in the Navigation stack, I need to segue to a screen showing splitviewcontroller. how to I go about that ?
Thanks in advance for any help on this.
Upvotes: 0
Views: 1055
Reputation: 171
I had the exact same problem and I solved it by implementing a custom segue.
@implementation LoginSegue
- (void) perform {
NSLog(@"Do the segue you way");
UIViewController *src = self.sourceViewController;
UIWindow *window = src.view.window;
[window addSubview:[self.destinationViewController view]];
window.rootViewController = self.destinationViewController;
}
@end
This seems to have worked for me. I hope this is an acceptable solution when I submit the code to apple.
Upvotes: 1
Reputation: 11
A UISplitViewController
must always be the first/main view controller you use. You can't use it from a UINavigationController
or a UITabBarController
or similar.
Upvotes: 1