开发者

Seting reminder for special dates in iphone

开发者 https://www.devze.com 2023-04-02 00:23 出处:网络
In my app i want to set some reminders.The user need an option to select the reminder on the day he wishes.(for eg:u开发者_如何学JAVAser need reminder for Monday, not need for Tuesday etc).i have alre

In my app i want to set some reminders.The user need an option to select the reminder on the day he wishes.(for eg:u开发者_如何学JAVAser need reminder for Monday, not need for Tuesday etc).i have already implemented a local notification and it is working fine,But i have some confusions in implementing the reminder for particular days.Do i have to implement seven reminders for this purpose? Can anyone give a hand for this issue please.


As you can see from the repeatInterval property, that you can specify only the predefined calendar units.

enum {
   NSEraCalendarUnit = kCFCalendarUnitEra,
   NSYearCalendarUnit = kCFCalendarUnitYear,
   NSMonthCalendarUnit = kCFCalendarUnitMonth,
   NSDayCalendarUnit = kCFCalendarUnitDay,
   NSHourCalendarUnit = kCFCalendarUnitHour,
   NSMinuteCalendarUnit = kCFCalendarUnitMinute,
   NSSecondCalendarUnit = kCFCalendarUnitSecond,
   NSWeekCalendarUnit = kCFCalendarUnitWeek,
   NSWeekdayCalendarUnit = kCFCalendarUnitWeekday,
   NSWeekdayOrdinalCalendarUnit = kCFCalendarUnitWeekdayOrdinal
   NSQuarterCalendarUnit = kCFCalendarUnitQuarter,
};

So, if you want the notification to repeat on any of these above intervals you can use the repeatInterval property with any of these values. But if you want the notification to repeat on intervals some like "Every Two Days" or on some irregular intervals, then you have to create individual notifications for each of those reminders.

0

精彩评论

暂无评论...
验证码 换一张
取 消