From 693e30fcd120b7c803d849b1b313c77eceee8c42 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 10 Dec 2017 13:58:30 +0300 Subject: random fixes --- Juick/AppDelegate.m | 22 ++++++++-------------- Juick/LaunchScreen.storyboard | 2 +- Juick/Supporting Files/Juick-Info.plist | 2 +- 3 files changed, 10 insertions(+), 16 deletions(-) (limited to 'Juick') diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index 43494cf..4cd7f2d 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -28,7 +28,10 @@ [[UINavigationBar appearance] setTintColor:[ColorScheme linkColor]]; //[[UINavigationBar appearance] setBarTintColor:[ColorScheme headerBackground]]; [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [ColorScheme linkColor]}]; - [[UINavigationBar appearance] setLargeTitleTextAttributes:@{NSForegroundColorAttributeName: [ColorScheme linkColor]}]; + UIFont *defaultLargeFont = [UIFont preferredFontForTextStyle: UIFontTextStyleLargeTitle]; + [[UINavigationBar appearance] setLargeTitleTextAttributes:@{NSForegroundColorAttributeName: [ColorScheme linkColor], + NSFontAttributeName:[UIFont fontWithName:@"Serpentine-BoldItalic" size:defaultLargeFont.pointSize] + }]; [[UIToolbar appearance] setTintColor:[ColorScheme linkColor]]; [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault; @@ -39,15 +42,6 @@ return YES; } --(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - [self parseNotificationPayload:userInfo]; - if (application.applicationState == UIApplicationStateActive) { - UIStoryboard *main = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]]; - [main instantiateInitialViewController]; - } - completionHandler(UIBackgroundFetchResultNewData); -} - - (void)registerForRemoteNotifications { UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self; @@ -80,15 +74,15 @@ //Called when a notification is delivered to a foreground app. -(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{ - NSDictionary *userInfo = notification.request.content.userInfo; - NSLog(@"User Info : %@", userInfo); - [self parseNotificationPayload:userInfo]; completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge); } //Called to let your app know which action was selected by the user for a given notification. -(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler{ - NSLog(@"User Info : %@",response.notification.request.content.userInfo); + NSDictionary *userInfo = response.notification.request.content.userInfo; + NSLog(@"User Info : %@", userInfo); + [self parseNotificationPayload:userInfo]; + [self.window.rootViewController performSegueWithIdentifier:@"threadSegue" sender:self.window.rootViewController]; completionHandler(); } diff --git a/Juick/LaunchScreen.storyboard b/Juick/LaunchScreen.storyboard index be5fe7e..42e3ea8 100644 --- a/Juick/LaunchScreen.storyboard +++ b/Juick/LaunchScreen.storyboard @@ -18,7 +18,7 @@ - + diff --git a/Juick/Supporting Files/Juick-Info.plist b/Juick/Supporting Files/Juick-Info.plist index 0b992da..16b325a 100644 --- a/Juick/Supporting Files/Juick-Info.plist +++ b/Juick/Supporting Files/Juick-Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1.0.36 + 1.0.39 ITSAppUsesNonExemptEncryption LSApplicationCategoryType -- cgit v1.2.3