summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2013-11-05 00:10:01 +0400
committerGravatar Vitaly Takmazov2013-11-05 00:10:01 +0400
commitfad0e1e93e1f2e145970829f81a0c20e42eba09a (patch)
tree2f69b3fb901e66e9fa01f876b110649ac4acef41 /Juick/AppDelegate.m
parent08574251153406e4755f58c2ee5548ee32e308fb (diff)
RevealViewController and small other additions
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m26
1 files changed, 25 insertions, 1 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index 23cef5e..3fa3030 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -7,12 +7,36 @@
//
#import "AppDelegate.h"
-#import "MasterViewController.h"
+#import "MessagesViewController.h"
+#import "RevealPanelViewController.h"
+#import "SWRevealViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
+ // style the navigation bar
+ UIColor* navColor = [UIColor colorWithRed:44/255.0f green:44/255.0f blue:44/255.0f alpha:1];
+ [[UINavigationBar appearance] setBarTintColor:navColor];
+ [[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:153/255.0f green:154/255.0f blue:153/255.0f alpha:1]];
+ [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor colorWithRed:153/255.0f green:154/255.0f blue:153/255.0f alpha:1]}];
+
+ // make the status bar white
+ [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
+
+ MessagesViewController *messages = [[MessagesViewController alloc] initWithURL:[NSURL URLWithString:@"https://api.juick.com/messages"]];
+ RevealPanelViewController *rear = [[RevealPanelViewController alloc] init];
+
+ UINavigationController *main = [[UINavigationController alloc] initWithRootViewController:messages];
+ UINavigationController *rearNav = [[UINavigationController alloc] initWithRootViewController:rear];
+
+ SWRevealViewController *reveal = [[SWRevealViewController alloc] initWithRearViewController:rearNav frontViewController:main];
+ self.viewController = reveal;
+
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ self.window.rootViewController = reveal;
+ [self.window makeKeyAndVisible];
+
return YES;
}