Ich muss UILocalNotification einstellen, ich muss nur Stunden und Minuten von DatePicker nehmen und muss ein bestimmtes Datum (wie: Montag) und wiederholen Sie es an jedem Montag.Wiederholen UILocalNotification am spezifischen Tag
Ich habe zwei Frage:
Zuerst ein; ist es möglich, nur "Tagnamen" wie "Sonntag" im Datumsbereich der Datumsauswahl anzuzeigen?
Zweite Frage ist; Was sind die richtigen Codes, wenn ich ein bestimmtes Datum für die lokale Benachrichtigung festlegen möchte?
Vielen Dank für die Antworten und hier ist mein Code unten;
-(IBAction) alarmButton:(id)sender {
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
dateFormatter.timeZone = [NSTimeZone defaultTimeZone];
dateFormatter.timeStyle = NSDateFormatterShortStyle;
dateFormatter.dateStyle = NSDateFormatterShortStyle;
NSString *dateTimeString = [dateFormatter stringFromDate: dateTimePickerSet1.date];
NSLog (@"Alarm Set :%@" , dateTimeString);
[self scheduleLocalNotificationWithDate1: dateTimePickerSet1.date];
}
-(void)scheduleLocalNotificationWithDate1:(NSDate *)fireDate {
UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.fireDate = fireDate;
notification.alertBody = @"Alarm Set !";
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
prüfen - http://useyourloaf.com/blog/2010/09/13/repeating-an-ios-local-notification.html oder Sie c ein auch erhalten Sie Hilfe von http://stackoverflow.com/questions/14769462/set-repeatinterval-in-local-notification oder http://stackoverflow.com/questions/18014438/repeating-a-local-notification-after- alle-14-Tage-zwei-Wochen – Bharat