ZTSignal
Create instances of ZTSignal
and assign them to public constants on your class for each event type that your
class fires.
-
-
The number of times the
ZTSignal
has fired. -
Whether or not the
ZTSignal
should retain a reference to the last data it was fired with. Defaults to false. -
The last data that the
ZTSignal
was fired with. In order for theZTSignal
to retain the last fired data, itsretainLastFired
-property needs to be set to true -
All the observers of to the
ZTSignal
. -
Initializer.
-
Subscribes an observer to the
ZTSignal
. -
Subscribes an observer to the
ZTSignal
. The subscription is automatically canceled after theZTSignal
has fired once. -
Subscribes an observer to the
ZTSignal
and invokes its callback immediately with the last data fired by theZTSignal
if it has fired at least once and if theretainLastData
property has been set to true. -
Subscribes an observer to the
ZTSignal
and invokes its callback immediately with the last data fired by theZTSignal
if it has fired at least once and if theretainLastData
property has been set to true. If it has not been fired yet, it will continue listening until it fires for the first time. -
Fires the
Singal
. -
Cancels all subscriptions for an observer.
-
Cancels all subscriptions for the
ZTSignal
. -
Clears the last fired data from the
ZTSignal
and resets the fire count. -