events(matching:)
Finds all events that match a given predicate.
Declaration
func events(matching predicate: NSPredicate) -> [EKEvent]Parameters
- predicate:
A search predicate created with Predicateforevents(withstart:end:calendars:).
Mentioned in
Return Value
An array of events that match predicate.
Discussion
Only committed events are included in the results. To include events saved using save(_:span:commit:) with the commit parameter set to false, call commit() first.
This method is synchronous. For asynchronous behavior, run the method on another thread with dispatch_async or Operation.
See Also
Searching calendars
enumerateEvents(matching:using:)fetchReminders(matching:completion:)cancelFetchRequest(_:)predicateForEvents(withStart:end:calendars:)predicateForReminders(in:)predicateForCompletedReminders(withCompletionDateStarting:ending:calendars:)predicateForIncompleteReminders(withDueDateStarting:ending:calendars:)EKEventSearchCallback