---
title: "predicateForEvaluatingTrigger(occurringAfter:applyingOffset:)"
framework: homekit
role: symbol
role_heading: Type Method
path: "homekit/hmeventtrigger/predicateforevaluatingtrigger(occurringafter:applyingoffset:)"
---

# predicateForEvaluatingTrigger(occurringAfter:applyingOffset:)

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

## Declaration

```swift
class func predicateForEvaluatingTrigger(occurringAfter significantEvent: String, applyingOffset offset: DateComponents?) -> NSPredicate
```

## 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 doc://com.apple.documentation/documentation/Foundation/NSDateComponents object must be positive values. For example, to specify 30 minutes after sunset, set the doc://com.apple.documentation/documentation/Foundation/NSDateComponents/minute property to 30.

## Return Value

Return Value A predicate object that represents a condition to evaluate before executing the scene.

## See Also

### Deprecated symbols

- [addEvent(_:completionHandler:)](homekit/hmeventtrigger/addevent(_:completionhandler:).md)
- [removeEvent(_:completionHandler:)](homekit/hmeventtrigger/removeevent(_:completionhandler:).md)
- [predicateForEvaluatingTrigger(occurringBefore:applyingOffset:)](homekit/hmeventtrigger/predicateforevaluatingtrigger(occurringbefore:applyingoffset:).md)
