특정 날짜에 지역 알림을 발생시키는 방법을 알아 내려고하고 있습니다.NSCalendar 장치 이해 (내가 5 살이라고 설명해주십시오.)
나는 캘린더 유닛을 사용해야한다. 그러나 내가 그들에 대해 발견 한 설명은 악취가 난다. 너희들이 나에게 설명해 주시겠습니까? 제가 5 살인 것처럼, 그들이 어떤 간격을 나타 냅니까?
나는 내가 알고 있다고 생각하는 것들을 채웠다. 내가 잘못하면 다른 사람들을 채우 라. 월요일부터 매일 화재
- :
UILocalNotification* alarm = [[[UILocalNotification alloc] init] autorelease]; if (alarm) { alarm.fireDate = aDate; alarm.timeZone = [NSTimeZone systemTimeZone]; alarm.repeatInterval = WHAT DO I PUT HERE? TO MAKE IT REPEAT JUST SATURDAYS AND SUNDAYS?; alarm.soundName = @"alarm.caf"; alarm.alertBody = @"hi there"; [app scheduleLocalNotification:alarm]; }
나는 이러한 가능성 중 하나에 로컬 알림을 프로그램 할 필요가 :
NSEraCalendarUnit = ????? era? NSYearCalendarUnit = event will repeat once in a year at the same month, day and hour NSMonthCalendarUnit = event will repeat once a month at the same day and hour NSDayCalendarUnit = event will repeat every day at the same hour NSHourCalendarUnit = event will repeat every hour at the same minute NSMinuteCalendarUnit = event will repeat every minute at the same second NSSecondCalendarUnit = event will repeat every second NSWeekCalendarUnit = event will repeat the same day of week every week NSWeekdayCalendarUnit = ?????? can I make it repeat just specific days? I mean, monday to friday but not saturday and sunday? NSWeekdayOrdinalCalendarUnit = ????? how do I use that? NSQuarterCalendarUnit = when exactly will it repeat? every 3 months? NSCalendarCalendarUnit = ????????? NSTimeZoneCalendarUnit = ????????
이
내가해야 할 일의 예입니다 토요일과 일요일을 제외한 금요일까지 - 토요일과 일요일마다 그리고 다른 날에는 발사되지 않습니다.
- 은 매주 같은 요일에 반복됩니다.
이 작업을 수행하려면 repeatInterval에 어떤 값을 사용해야합니까?
감사합니다.
좋은 생각, 고마워. 내 질문에 물음표가있는 항목을 어떻게 설명 할 수 있습니까? 도대체 NSWeekdayCalendarUnit이 무엇입니까? NSCalendarCalendarUnit은 어떻습니까? 애플은이 사람들을 비열한 문서를 작성해야만합니다. 그들의 문서는 제품의 품질, 품질의 반대입니다. – SpaceDog