更改重复本地通知的alertBody

时间:2016-06-10 22:49:07

标签: ios swift uilocalnotification

每次都可以使用不同的alertBody重复本地通知吗?如果没有,我怎么能实现这样的功能?

代码(编辑)

let notification = UILocalNotification()
notification.fireDate = NSDate(timeIntervalSinceNow: 60)
// randomItem is an extension in the code.
notification.alertBody = self.athkar.randomItem()
notification.soundName = UILocalNotificationDefaultSoundName
notification.repeatInterval = NSCalendarUnit.Minute

UIApplication.sharedApplication().scheduleLocalNotification(notification)

0 个答案:

没有答案