MulticastDelegate
public class MulticastDelegate<ProtocolType>
Class that provides multicast delegate feature for a generic protocol. Delegate objects could be added using addDelegate and removeDelegate functions. Delegate callbacks can be triggered to all registered delegates using invokeDelegate function.
-
List of delegates that must be invoked while delegate callbacks
Declaration
Swift
public var delegates: [ProtocolType] { get }
-
Undocumented
Declaration
Swift
public init(delegates: [ProtocolType] = []) -
API to add multiple delegates to listen playback events
Declaration
Swift
public func addDelegate(_ delegate: ProtocolType) -
API to remove delegates that were added using addDelegate function
Declaration
Swift
public func removeDelegate(delegate: ProtocolType) -
API to invoke delegate callbacks on all the delegate objects
Declaration
Swift
public func invokeDelegates(_ closure: (ProtocolType) -> Void)