I am trying to make some changes to an EKEvent object in my calendar. I have an event, for example, from 1 to 2 in the morning. When I set the allDay property to YES, this event will be correctly changed and will be displayed throughout the entire day section of the calendar. But this does not work the other way around. I set the start and end time correctly, and the allDay property is NO, but the event remains as it is. Time changes are not updated. That's what I'm doing:
EKEvent *event = [self.eventStore eventWithIdentifier:MY_IDENTIFIER];
NSDate *start = [NSDate date];
NSDate *end = [start addTimeInterval:3600];
event.startDate = start;
event.endDate = end;
event.allDay = NO;
NSError *error;
[self.eventStore saveEvent:event span:EKSpanThisEvent error:&error];
All changes work, and I get no errors - only changing allDay YES to NO does not work. I looked at the Apple documentation and only found information that the start and end dates of the event can be set. I am not sure if this means that allDay events are enabled and can be set too.
?