【问题标题】:swift 3 local notification: how to change display text for each notificationswift 3 本地通知:如何更改每个通知的显示文本
【发布时间】:2017-03-06 17:50:03
【问题描述】:

我知道如何制作每天在特定时间触发的本地通知。但是如何更改每个通知的 UNMutableNotificationContent.Body?

现在它只是一遍又一遍地显示相同的文本。

我正在为 iOS 10 编写代码。

【问题讨论】:

    标签: notifications local


    【解决方案1】:

    你试过了吗?

    let content = UNMutableNotificationContent()
    content.title = self.notificationTitle // You could set this variable to anything you like
    content.body = self.notificationBody // You could set this variable to anything you like
    content.sound = UNNotificationSound.default()
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-21
      • 2017-05-03
      相关资源
      最近更新 更多