문제

I keep an instance of EKEvent and want to copy it. But I found EKEvent doesn't conform NSCopying protocol, so I try to add a category to EKEvent to let it conforms this protocol, however, eventIdentifier is a read-only attribute, so, this method failed.

Any way to do so?

도움이 되었습니까?

해결책

Copying an EKEvent object is maybe not necessary. At first I want to make sure my new Custom class object is absolutely a copy of another one. However, what should do is create a new EKEvent object use this method.

- (EKEvent *)eventWithIdentifier:(NSString *)identifier

Make sure you keep the original EventStore object and use same EKCalendar.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top