swift开发笔记27 UserNotifications

 

UNNotificationAction

UNNotificationCategory

 

UNCalendarNotificationTrigger

 

UNMutableNotificationContent

UNNotificationAttachment

UNNotificationRequest

/// Remove pending notifications to avoid duplicates.

        UNUserNotificationCenter.current().removeAllPendingNotificationRequests()

        /// Provide request to notification center.

        UNUserNotificationCenter.current().add(notiRequest) { (error) in

            if let error = error {

                print("Error: " + error.localizedDescription)

            }

        }

 

原文地址:https://www.cnblogs.com/dengchaojie/p/8177169.html