predicateForEvaluatingTrigger(occurringAfter:applyingOffset:)
Creates a predicate that evaluates whether the event occurred before a significant event.
Declaration
class func predicateForEvaluatingTrigger(occurringAfter significantEvent: String, applyingOffset offset: DateComponents?) -> NSPredicateParameters
- significantEvent:
The significant event to compare against. Valid values for this parameter are
HMSignificantEventSunriseandHMSignificantEventSunset. - offset:
An offset from the time of the significant event. To specify an offset after a significant event, the properties of the Nsdatecomponents object must be positive values. For example, to specify 30 minutes after sunset, set the Minute property to
30.
Return Value
A predicate object that represents a condition to evaluate before executing the scene.