2012-10-29 80 views
2

我開發一個應用程序,它允許你設置每月提醒賬單,每月重複提醒IOS

我已經通過datepicckers API看了看,似乎無法找到如何使它每個月重複。 我怎麼能做到這一點?

+0

檢查此鏈接http://reecon.wordpress.com/2010/11/12/setting-a-reminder-using-uilocalnotification-in-ios-4-objective-c/ – riti

回答

1

Custamize的代碼。有關詳情請參閱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];