Index

RBEventCenter.swift

Protocols

Classes


RBEventCenter

The global events center.

Functions

Register an object as a listener for an event.
@param listener : An object that implements RBEventListener.
@param event : The name of the event to be notified of.
public class func register(_ listener: RBEventListener, forEvent event: String)

Unregister an object as a listener for an event.
@param listener : The currently registered listener for the event.
@param event : The name of the event to stop being notified of.
public class func unregisterListener(_ listener: RBEventListener, forEvent event: String)

Unregister an object as a listener for all events.
@param listener : The currently registered listener for one or more events.
public class func unregisterListener(_ listener: RBEventListener)

Raise an event.
@param event : The name of the event to raise.
@param sender : The object that raised the event.
@param data : User data to provide to listeners of the event.
@param handleSynchronously : Whether the listeners will be informed synchronously (true) or simultaneously (false).
@param completion : The completion block to be called when the event has been handled.
public class func raiseEvent(withName event: String, withSender sender: Any?, withData data: Any?, handleSynchronously: Bool, completion: (() -> Void)?)