NSWeekCalendarUnit与NSWeekDayCalendarUnit之间的区别UILocalNotification repeatInterva

时间:2012-02-22 13:35:00

标签: iphone uilocalnotification nscalendar

对于UILocalNotification repeatInterval,NSWeekCalendarUnit和NSWeekDayCalendarUnit之间有什么区别?

localNotification = [[UILocalNotification alloc]init];
NSDate *currDate1 = [defaults objectForKey:@"Default_AlarmTime"];
localNotification.fireDate = currDate1;
localNotification.alertBody = @"Alarm";
localNotification.alertAction = @"View";
localNotification.soundName = UILocalNotificationDefaultSoundName;
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.repeatInterval = NSWeekdayCalendarUnit;
[[UIApplication sharedApplication]scheduleLocalNotification:localNotification];

解雇本地通知多少次?

1 个答案:

答案 0 :(得分:0)

如果为repeatInterval属性设置NSWeekdayCalendarUnit,则每天都会调用它。

如果为repeatInterval属性设置NSWeekCalendarUnit,则每周调用它。