summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m14
1 files changed, 10 insertions, 4 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index f59ff02..28bacc9 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -30,12 +30,18 @@
UINavigationController *main = [[UINavigationController alloc] initWithRootViewController:messages];
UINavigationController *rearNav = [[UINavigationController alloc] initWithRootViewController:rear];
-
- SWRevealViewController *reveal = [[SWRevealViewController alloc] initWithRearViewController:rearNav frontViewController:main];
- self.viewController = reveal;
+ if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
+ SWRevealViewController *reveal = [[SWRevealViewController alloc] initWithRearViewController:rearNav frontViewController:main];
+ self.viewController = reveal;
+ } else {
+ UISplitViewController *split = [[UISplitViewController alloc] init];
+ split.viewControllers = [NSArray arrayWithObjects:rearNav, main, nil];
+ split.delegate = messages;
+ self.viewController = split;
+ }
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- self.window.rootViewController = reveal;
+ self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;