I am trying to set a repeatingInterval of a UILocalNotification using these values but, as always, Apple docs are vague as hell.
Any clues?
thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Maybe look at this blog I just found about the subject?
AFAIK,
NSCalendarUnitsare primarely used to split a date or timeInterval into date components (NSDateComponents), to extract the weekday of a date, the year of the date, the hour component of a time, and so on.In this context:
NSWeekCalendarUnitof a date correspond to the week index in the year (from 1st to 52nd week – or 53rd for years with 53 weeks)NSWeekdayCalendarUnitcorresponds to the day in the week (from Mon to Sun)NSDayCalendarUnitcorresponds to the day in the year (from 1 to 365)When using the NSCalendarUnit type with
repeatingInterval, the UILocalNotification will be triggered when the corresponding unit changes:NSWeekCalendarUnitwill trigger the notification every week (every 7 days)NSWeekdayCalendarUnitwill trigger the notification “every weekday”, which corresponds to the same thing here asNSDayCalendarUnitwhich corresponds to “every day” in the context of a repeatingInterval.