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
ZTSignalhas fired. -
Whether or not the
ZTSignalshould retain a reference to the last data it was fired with. Defaults to false. -
The last data that the
ZTSignalwas fired with. In order for theZTSignalto 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 theZTSignalhas fired once. -
Subscribes an observer to the
ZTSignaland invokes its callback immediately with the last data fired by theZTSignalif it has fired at least once and if theretainLastDataproperty has been set to true. -
Subscribes an observer to the
ZTSignaland invokes its callback immediately with the last data fired by theZTSignalif it has fired at least once and if theretainLastDataproperty 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
ZTSignaland resets the fire count. -
View on GitHub
ZTSignal Class Reference