From b3eaef8a304ce89242c649cfd0386a66e463acb2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 7 Nov 2013 03:35:52 +0400 Subject: iPad support and AppIcon --- Juick/AppDelegate.m | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Juick/AppDelegate.m') 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; -- cgit v1.2.3