Type Method

predicateForEvaluatingTriggerOccurringAfterSignificantEvent:applyingOffset:

Creates a predicate that evaluates whether the event occurred before a significant event.

Declaration

+ (NSPredicate *)predicateForEvaluatingTriggerOccurringAfterSignificantEvent:(NSString *)significantEvent applyingOffset:(NSDateComponents *)offset;

Parameters

significantEvent

The significant event to compare against. Valid values for this parameter are HMSignificantEventSunrise and HMSignificantEventSunset.

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.

See Also

Deprecated Symbols

- addEvent:completionHandler:

Adds a new event to the event trigger.

Deprecated
- removeEvent:completionHandler:

Removes the specified event from the event trigger.

Deprecated
+ predicateForEvaluatingTriggerOccurringBeforeSignificantEvent:applyingOffset:

Creates a predicate that evaluates whether the event occurred before a significant event.

Deprecated