Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
- var window: UIWindow?
- func applicationDidFinishLaunching(application: UIApplication) {
- UNUserNotificationCenter.currentNotificationCenter().delegate = self
- }
- func userNotificationCenter(center: UNUserNotificationCenter, willPresentNotification notification: UNNotification, withCompletionHandler completionHandler: (UNNotificationPresentationOptions) -> Void) {
- print("willPresent")
- completionHandler([.Badge, .Alert, .Sound])
- }
- func userNotificationCenter(center: UNUserNotificationCenter, didReceiveNotificationResponse response: UNNotificationResponse, withCompletionHandler completionHandler: () -> Void) {
- print("didReceive")
- completionHandler()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement