summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m33
1 files changed, 12 insertions, 21 deletions
diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m
index 56b6ee9..51304dc 100644
--- a/Juick/AppDelegate.m
+++ b/Juick/AppDelegate.m
@@ -19,11 +19,8 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
- // style the navigation bar
- if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) {
- [[UINavigationBar appearance] setTintColor:[ColorScheme linkColor]];
- [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [ColorScheme linkColor]}];
- }
+ [[UINavigationBar appearance] setTintColor:[ColorScheme linkColor]];
+ [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [ColorScheme linkColor]}];
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
@@ -32,22 +29,16 @@
UINavigationController *main = [[UINavigationController alloc] initWithRootViewController:messages];
UINavigationController *rearNav = [[UINavigationController alloc] initWithRootViewController:rear];
- 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:UIBarButtonItemStylePlain 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;
- }
+ 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:UIBarButtonItemStylePlain target:reveal action:@selector(revealToggle:)];
+ messages.navigationItem.leftBarButtonItem = revealButtonItem;
+ UIBarButtonItem *compose = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose
+ target:messages action:@selector(composePressed)];
+ messages.navigationItem.rightBarButtonItem = compose;
+
if ([User isAuthenticated]) {
[User checkIsValid:^(BOOL success) {
if (success) {