2

我正在开发一个应用程序,它允许您设置账单的每月提醒,

我查看了 datepickers API,似乎无法找到如何让它每个月重复。我怎么能做到这一点?

4

2 回答 2

1

您需要使用 UILocalNotification API

参考 http://www.icodeblog.com/2010/07/29/iphone-programming-tutorial-local-notifications/

于 2012-10-29T09:12:56.090 回答
1

根据您的需要自定义代码。有关详细信息,请参阅UILocalNotification 类参考

     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]; 
于 2012-10-29T09:37:23.207 回答