summaryrefslogtreecommitdiff
path: root/Juick/AppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/AppDelegate.m')
-rw-r--r--Juick/AppDelegate.m22
1 files changed, 8 insertions, 14 deletions
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();
}