首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >swift 3本地通知:如何更改每个通知的显示文本

swift 3本地通知:如何更改每个通知的显示文本
EN

Stack Overflow用户
提问于 2016-10-25 04:35:53
回答 1查看 523关注 0票数 3

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

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

我正在为iOS 10编写代码。

EN

回答 1

Stack Overflow用户

发布于 2017-06-02 02:52:12

你试过这个吗?

代码语言:javascript
运行
复制
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()
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40227097

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档