我正在开发一个应用程序,允许您设置账单的每月提醒,
我查看过datepicckers API,似乎无法找到如何让它每个月重复一次。 我怎么能做到这一点?
答案 0 :(得分:1)
您需要使用UILocalNotification API
参考 http://www.icodeblog.com/2010/07/29/iphone-programming-tutorial-local-notifications/
答案 1 :(得分:1)
根据您的需要定制代码。有关详细信息,请参阅UILocalNotification Class Reference
UILocalNotification *localNotification = [[[UILocalNotification alloc] init] autorelease];
localNotification.fireDate = date; //The date and time when the system should deliver the notification.
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.alertBody = alertBody;
localNotification.alertAction = @"View";
localNotification.repeatCalendar = [NSCalendar currentCalendar];
localNotification.repeatInterval = NSMonthCalendarUnit;
localNotification.soundName = UILocalNotificationDefaultSoundName;
localNotification.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];