AuroraLive Player iOS SDK Documentation

Class Multicast​Delegate

public class MulticastDelegate<T>: NSObject, Loggable  

A class that allows to have multiple delegates instead of one.

Uses NSHashTable internally to maintain a set of weak delegates.

Note: NSHashTable may not immediately deinit the un-referenced object, due to Apple's implementation, therefore .count is unreliable.

MulticastDelegate MulticastDelegate Loggable Loggable MulticastDelegate->Loggable NSObject NSObject MulticastDelegate->NSObject

Conforms To

NSObject

Methods

add(delegate:​)

public func add(delegate: T)  

Add a single delegate.

remove(delegate:​)

public func remove(delegate: T)  

Remove a single delegate.

In most cases this is not required to be called explicitly since all delegates are weak.

remove​All​Delegates()

public func removeAllDelegates()  

Remove all delegates.