I'm trying to implement local notifications for a calendar-esque application, and I've hit a barrier with reminder intervals. Local notifications seem to only take NSCalendarUnit constants as repeat intervals ( see http://developer.apple.com/iphone/library/documentation/iPhone/Reference/UILocalNotification_Class/Reference/Reference.html#//apple_ref/occ/instp/UILocalNotification/repeatInterva开发者_如何学运维l ), as opposed to the typical NSTimeInterval value.
The application that I'm trying to develop would be severely restricted if I'm limited to NSCalendarUnit constants ( which are listed here: http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSCalendar_Class/Reference/NSCalendar.html#//apple_ref/doc/c_ref/NSCalendarUnit ). Is there any way that I can set custom time intervals in a local notification?
You have to schedule multiple LocalNotifications separated by your time frame, until they fix that bug. I am pretty sure I saw that someone filed it as a bug in the Apple Developer forums
精彩评论