From fad0e1e93e1f2e145970829f81a0c20e42eba09a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 5 Nov 2013 00:10:01 +0400 Subject: RevealViewController and small other additions --- Juick/AppDelegate.m | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'Juick/AppDelegate.m') 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; } -- cgit v1.2.3