草庐IT

componentsForReferenceDate

全部标签

iphone - 如何每隔一天或每隔一天安排 UILocalNotification?

我在我的应用程序中安排了每天上午10:00的UILocalNotification。我为此使用了以下代码NSCalendar*calendar=[NSCalendarautoupdatingCurrentCalendar];NSDateComponents*componentsForReferenceDate=[calendarcomponents:(NSDayCalendarUnit|NSYearCalendarUnit|NSMonthCalendarUnit)fromDate:[NSDatedate]];[componentsForReferenceDatesetDay:10];[