【发布时间】:2017-02-27 05:00:08
【问题描述】:
我有以下代码:
func sendLucidNotification() {
let content = UNMutableNotificationContent()
content.title = "10 Second Notification Demo"
content.subtitle = "From MakeAppPie.com"
content.body = "Notification after 10 seconds - Your pizza is Ready!!"
content.categoryIdentifier = "message"
}
当我调用 UNMutableNotificationContent 或任何“UNMutableNotification”变体时,我收到以下错误:
Use of unresolved identifier: "UNMutableNotificationContent"
我使用的是 Xcode 8.0,但是当我尝试自动完成时,它也无法识别它。有任何想法吗 ?谢谢!
【问题讨论】:
-
你导入
UserNotifications框架了吗?
标签: ios swift uilocalnotification unnotificationrequest