Created
March 1, 2018 22:46
-
-
Save 3257/fed4350e00158b65f046358ddd4d2be2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { | |
+ if response.actionIdentifier == "like" { | |
+ print("Handle like action identifier") | |
+ } else if response.actionIdentifier == "save" { | |
+ print("Handle save action identifier") | |
+ } else { | |
+ print("No custom action identifiers chosen") | |
+ } | |
+ // Make sure completionHandler method is at the bottom of this func | |
+ completionHandler() | |
+ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment