From 49cd38a2ef9ad9c9aa08bdb3ff2baafb6abede89 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 28 Aug 2016 21:16:56 +0300 Subject: drop iOS6 support --- Juick/AppDelegate.m | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'Juick/AppDelegate.m') 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) { -- cgit v1.2.3