Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top