Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Notifications swift 3本地通知:如何更改每个通知的显示文本_Notifications_Local - Fatal编程技术网

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

Notifications swift 3本地通知:如何更改每个通知的显示文本,notifications,local,Notifications,Local,我知道如何在每天的特定时间发出本地通知。但是如何更改每个通知的UNMutableNotificationContent.Body 现在它只是一遍又一遍地显示相同的文本 我正在为iOS 10编写代码。你试过这个吗 let content = UNMutableNotificationContent() content.title = self.notificationTitle // You could set this variable to anything you like content.

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

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

我正在为iOS 10编写代码。

你试过这个吗

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()