Mediator
A base IMediator implementation.
`@see org.puremvc.swift.core.View View
-
The name of the
Mediator.Typically, a
Mediatorwill be written to serve one specific control or group controls and so, will not have a need to be dynamically named.Declaration
Swift
open class var NAME: String { get } -
Declaration
Swift
public private(set) var name: String { get } -
Declaration
Swift
public weak var viewComponent: AnyObject? -
Constructor.
Declaration
Swift
public init(name: String? = nil, viewComponent: AnyObject? = nil)Parameters
mediatorNamethe mediator name
viewComponentviewComponent instance
-
List the
INotificationnames thisMediatoris interested in being notified of.Declaration
Swift
open func listNotificationInterests() -> [String]Return Value
Array the list of
INotificationnames -
Handle
INotifications.Typically this will be handled in a switch statement, with one ‘case’ entry per
INotificationtheMediatoris interested in.Declaration
Swift
open func handleNotification(_ notification: INotification) -
Called by the View when the Mediator is registered
Declaration
Swift
open func onRegister() -
Called by the View when the Mediator is removed
Declaration
Swift
open func onRemove()
Mediator Class Reference