对于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];
解雇本地通知多少次?
答案 0 :(得分:0)
如果为repeatInterval属性设置NSWeekdayCalendarUnit,则每天都会调用它。
如果为repeatInterval属性设置NSWeekCalendarUnit,则每周调用它。