init(characteristic:triggerValue:)
Creates a new characteristic event which triggers when the specified characteristic reaches the specified value.
Declaration
init(characteristic: HMCharacteristic, triggerValue: TriggerValueType?)Parameters
- characteristic:
The characteristic that the event is observing.
- triggerValue:
The value of the characteristic that triggers the event. Specifying
nilcauses the event to fire every time the value of the characteristic changes.
Return Value
An initialized characteristic event for the specified characteristic and trigger value.
Discussion
Use a characteristic that supports notification; otherwise this initializer throws an exception.