diff options
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r-- | Juick/AppDelegate.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index b47e710..874ea94 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -12,6 +12,7 @@ #import "SWRevealViewController.h" #import "ColorsAndButtons.h" +#import "Message.h" @implementation AppDelegate @@ -35,12 +36,20 @@ if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { SWRevealViewController *reveal = [[SWRevealViewController alloc] initWithRearViewController:rearNav frontViewController:main]; self.viewController = reveal; + [messages.navigationController.navigationBar addGestureRecognizer:reveal.panGestureRecognizer]; + UIBarButtonItem *revealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"] + style:UIBarButtonItemStyleBordered target:reveal action:@selector(revealToggle:)]; + messages.navigationItem.leftBarButtonItem = revealButtonItem; + UIBarButtonItem *compose = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose + target:messages action:@selector(composePressed)]; + messages.navigationItem.rightBarButtonItem = compose; } else { UISplitViewController *split = [[UISplitViewController alloc] init]; split.viewControllers = [NSArray arrayWithObjects:rearNav, main, nil]; split.delegate = messages; self.viewController = split; } + [messages loadFromURL:[NSURL URLWithString:[Message messagesUrl]] withTitle:@"Discover"]; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = self.viewController; |