Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Basic setup, transitioning from UISplitViewController to MGSplitViewControll #80

pavankataria opened this Issue Jan 26, 2013 · 2 comments


None yet
3 participants

I've been using a UISplitViewController two have two view controllers side by side. I've been trying to adjust the master view and was directed over to the MGSplitViewController git repository as apparently I can achieve the desired effect.
I've been creating my UISplitViewController programmatically and chose not to setup my splitview in interface builder. I wish to do the same with MGSplitViewController and then add something llike this.... masterview.width = 100;

Here's the programmatic code i have so far for my current simple UISplitViewController:

UISplitViewController *splitViewController = [[UISplitViewController alloc] init];

ListViewController *listViewController = [[ListViewController alloc] init];
DetailedViewController *mainViewController = [[DetailedViewController alloc] init];

UINavigationController *listNav = [[UINavigationController alloc] initWithRootViewController:listViewController];
UINavigationController *mainNav = [[UINavigationController alloc] initWithRootViewController:mainViewController];

splitViewController.viewControllers = [NSArray arrayWithObjects:listNav, mainNav, nil];
splitViewController.delegate = mainViewController;

[self.window setRootViewController:splitViewController]; 

How can i achieve this same effect using MGSplitViewController with the least amount of code possible
I hope someone can guide me and maybe show an example.


jamra commented Feb 19, 2013

I just did the same thing you are trying to do. Change UISplitViewController to MGSplitViewController. In your detail view controller, change the UISplitViewControllerDelegate to MGSplitViewControllerDelegate.

I didn't document my steps, but it's not too difficult. I would also recommend downloading the demo project. It gives you the ability to see all of the features that you will get from the MGSplitViewController.

Can you show some code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment