diff options
author | Vitaly Takmazov | 2013-11-07 03:35:52 +0400 |
---|---|---|
committer | Vitaly Takmazov | 2013-11-07 03:35:52 +0400 |
commit | b3eaef8a304ce89242c649cfd0386a66e463acb2 (patch) | |
tree | c4c755a6e37e662e6d4040e219a647fd8fe2eecb /Juick/AppDelegate.m | |
parent | 4397874170f270b0b0d0148c0909b5f1846a9ce3 (diff) |
iPad support and AppIcon
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r-- | Juick/AppDelegate.m | 14 |
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; |