swift开发笔记27 UserNotifications
2018-01-02 14:48 dengchaojie_learner 阅读(189) 评论(0) 收藏 举报
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)
}
}
浙公网安备 33010602011771号