Implementing Rich Notifications in iOS
1. Scheduling Notifications
1.1 Scheduling a Timed Notification
Timed notifications are the simplest to schedule. Before starting, add the following method call after both calls to hideNotificationsUI in ViewController.swift :
self?.scheduleNotification()
Then, add the implementation for the scheduleNotification method to the ViewController class:
func scheduleNotification () {
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 10, repeats: false)
let request = UNNotificationRequest(identifier: "new - quote", content: createNotification(
超级会员免费看
订阅专栏 解锁全文
153

被折叠的 条评论
为什么被折叠?



