Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top