diff options
author | Vitaly Takmazov | 2016-08-28 21:16:56 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-08-28 21:16:56 +0300 |
commit | 49cd38a2ef9ad9c9aa08bdb3ff2baafb6abede89 (patch) | |
tree | cda41995d9505b04460cadf4345b7b8fd3b13f34 /Juick/AppDelegate.m | |
parent | 188d8e4ea870d1a6c8edd5a9b323742804badeba (diff) |
drop iOS6 support
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r-- | Juick/AppDelegate.m | 33 |
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) { |