0

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];

本地通知被触发多少次?

4

1 回答 1

0

如果您将 NSWeekdayCalendarUnit 设置为 repeatInterval 属性,那么它将每天调用。

如果您将 NSWeekCalendarUnit 设置为 repeatInterval 属性,那么它将每周调用一次。

于 2012-02-24T09:13:59.990 回答