iPhone 캘린더에 일정을 추가 할 수있는 간단한 응용 프로그램을 만들고 있습니다. 그래서 저는 EKEvent의 recurrenceRule을 가지고 놀고 있습니다. 나는 (일요일 제외) 주에 모든 작업 일을 반복하는 이벤트를 만들기 위해 노력하고 있어요 경우EKRecurrenceRule (주중)
가(id)initRecurrenceWithFrequency:(EKRecurrenceFrequency)
typeinterval:(NSInteger)interval
daysOfTheWeek:(NSArray *)days
daysOfTheMonth:(NSArray *)monthDays
monthsOfTheYear:(NSArray *)months
weeksOfTheYear:(NSArray *)weeksOfTheYear
daysOfTheYear:(NSArray*)daysOfTheYear
setPositions:(NSArray *)setPositions
end:(EKRecurrenceEnd*)end
그래서 예를 들어, 나는이 초기화를 사용합니다 : 매우 긴 생성자 클래스 EKRecurrenceRule이 있습니다 : 그것이 작동하지 않는
initRecurrenceWithFrequency:EKRecurrenceFrequencyDaily
interval:1
daysOfTheWeek:[NSArray arrayWithObjects:
[EKRecurrenceDayOfWeek dayOfWeek:2],
[EKRecurrenceDayOfWeek dayOfWeek:3],
[EKRecurrenceDayOfWeek dayOfWeek:4],
[EKRecurrenceDayOfWeek dayOfWeek:5],
[EKRecurrenceDayOfWeek dayOfWeek:6],
[EKRecurrenceDayOfWeek dayOfWeek:7], nil]
daysOfTheMonth:nil
monthsOfTheYear:nil
weeksOfTheYear:nil
daysOfTheYear:nil
setPositions:nil
end:nil
하지만, 그냥 매일 이벤트를 반복 : S 를 내가 EKRecurrenceFrequencyMonthly 사용하려고하면, 그것은 작동합니다. 매월 이벤트를 반복하지만 일요일에는 이벤트를 반복하지 않습니다. 나는 그들이 버그가있는 것 같아서 애플에게 버그를보고했다.
다른 생각이 있으십니까?
hmm 그래, 뭔가 설명해도 바보 같아. 내가 이해할 수없는 이유는 이해가 가지 않는다. 예를 들어 매주 좋아하는 TV 프로그램을 봅니다 (일요일과 토요일을 제외한 매일). –