startDateComponents
The start date of the task.
Declaration
var startDateComponents: DateComponents? { get set }Mentioned in
Discussion
The use of date components allows the start date and its time zone to be represented in a single property. A nil time zone represents a floating date. Setting a date component without an hour, minute and second component will set the reminder to be an all-day reminder. If this property is set, the calendar must be set to NSGregorianCalendar; otherwise an exception is raised.
The start date components’s timeZone property corresponds to the timeZone property on EKCalendarItem. A change in one value will cause a change in the other. Setting the time zone directly on the components does not guarantee that your changes will be saved; instead, pull this property from the reminder, set the time zone on it, and assign it back to the reminder:
NSDateComponents *start = myEKReminder.startDateComponents;
start.timeZone = myNSTimeZone;
myEKReminder.startDateComponents = start;