compareStartDate(with:)
Compares the start date of the receiving event with the start date of another event.
Declaration
func compareStartDate(with other: EKEvent) -> ComparisonResultParameters
- other:
The event to compare against.
Mentioned in
Return Value
Returns ComparisonResult.orderedAscending if the start date of the receiver precedes the start date of other. Returns ComparisonResult.orderedSame if the start dates of the two events are identical. Returns ComparisonResult.orderedDescending if the start date of the receiver comes after the start date of other.
Discussion
You can pass the selector for this method to the NSArray method sortedArray(using:) to create an array of events sorted by start date.