我想运行UILocalNotifications和重复,每2分钟。为此我做:为什么UILocalNotifications不会重复?
let reminderNote: UILocalNotification = UILocalNotification()
reminderNote.fireDate = NSDate(timeIntervalSinceNow: 60 * 2)
reminderNote.repeatInterval = NSCalendarUnit.Hour
reminderNote.alertBody = "some text"
reminderNote.alertAction = "View"
UIApplication.sharedApplication().scheduleLocalNotification(reminderNote)
它运行它只是一次,后来它没有。
我想这是因为这行:
reminderNote.repeatInterval = NSCalendarUnit.Hour
我怎么能重复我的通知每1.5或2小时?
[UILocalNotification重复时间间隔自定义警报(太阳,星期一,星期三,星期四,星期五,星期五,星期六)可能的重复](http://stackoverflow.com/questions/6966365/uilocalnotification-repeat-interval-for-自定义报警阳光周一周二,周三,周四-F) –
@OlegGordiichuk这些帖子不帮我,所以这就是为什么我已经打开了一个新问题 –
也许你可以安排它调用的方法中的通知, ,安排另一个... –