MulticastDelegate

public class MulticastDelegate<T>

多代理转发类

Accessor

  • 是否是空,不包含delegate

    Declaration

    Swift

    public var isEmpty: Bool { get }

Lifecycle

  • 初始化,是否强引用delegate,默认false

    Declaration

    Swift

    public init(strongReferences: Bool = false)
  • 初始化,自定义引用选项

    Declaration

    Swift

    public init(options: NSPointerFunctions.Options)

Public

  • 添加delegate

    Declaration

    Swift

    public func add(_ delegate: T)
  • 移除delegate

    Declaration

    Swift

    public func remove(_ delegate: T)
  • 移除所有delegate

    Declaration

    Swift

    public func removeAll()
  • 是否包含delegate

    Declaration

    Swift

    public func contains(_ delegate: T) -> Bool
  • 调用所有delegates代理方法

    Declaration

    Swift

    public func invoke(_ block: (T) -> Void)