From 97253d60341018e1231043d673432c9c2a25c39c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 18 Oct 2021 18:27:03 +0300 Subject: iOS 15 updates --- Juick/AppDelegate.m | 17 +++++++++++++++-- Juick/LaunchScreen.storyboard | 12 +++++------- Juick/ViewControllers/DialogsViewController.m | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index aac90c7..cf2099a 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -42,8 +42,21 @@ self.sharedDateFormatter = [NSDateFormatter new]; self.sharedDateFormatter.dateFormat = @"yyyy-MM-dd HH:mm:ss"; [self.sharedDateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]]; - [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor colorNamed:@"Muted"]}]; - [[UINavigationBar appearance] setTranslucent:NO]; + NSDictionary *titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor colorNamed:@"Muted"]}; + if (@available(iOS 13.0, *)) { + UINavigationBarAppearance *appearance = [UINavigationBarAppearance new]; + [appearance configureWithOpaqueBackground]; + [appearance setTitleTextAttributes:titleTextAttributes]; + [UINavigationBar appearance].standardAppearance = appearance; + if (@available(iOS 15.0, *)) { + [UINavigationBar appearance].scrollEdgeAppearance = appearance; + } + } else { + [[UINavigationBar appearance] setTitleTextAttributes:titleTextAttributes]; + [[UINavigationBar appearance] setTranslucent:NO]; + } + + [[UITabBar appearance] setTintColor:[UIColor colorNamed:@"Title"]]; [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault; #if !TARGET_IPHONE_SIMULATOR diff --git a/Juick/LaunchScreen.storyboard b/Juick/LaunchScreen.storyboard index 42e3ea8..41534d1 100644 --- a/Juick/LaunchScreen.storyboard +++ b/Juick/LaunchScreen.storyboard @@ -1,11 +1,9 @@ - - - - + + - + @@ -19,16 +17,16 @@ - + + - diff --git a/Juick/ViewControllers/DialogsViewController.m b/Juick/ViewControllers/DialogsViewController.m index cca5479..5f2dca9 100644 --- a/Juick/ViewControllers/DialogsViewController.m +++ b/Juick/ViewControllers/DialogsViewController.m @@ -55,7 +55,7 @@ [indexPaths addObject:[NSIndexPath indexPathForRow:index inSection: 0]]; } [self.tableView beginUpdates]; - [self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:YES]; + [self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:NO]; [self.tableView endUpdates]; self.tableView.backgroundView = [UIView new]; } else { -- cgit v1.2.3