summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2013-11-10 18:51:44 +0400
committerGravatar Vitaly Takmazov2013-11-10 18:51:44 +0400
commit4e6a313148890e30774757b382aa3b3ba1622bb6 (patch)
tree999cfdbb23948a63d98ed0297ff337a8062d41fe /Juick/AppDelegate.m
parent44ad254eb2533b922e5de47c65f4af8c37813519 (diff)
refactoring and threadview
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m9
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;