MNCoreNotificationManager

@objc
open class MNCoreNotificationManager : NSObject
extension MNCoreNotificationManager : BridgeMNCoreNotificationManagerInterface

It represents an observable object. An observable object can have one or more observers.

  • Singleton pattern to get the core notification itself.

    Declaration

    Swift

    @objc
    public static let main: MNCoreNotificationManager
  • When notification fired with userInfos, here are the keys used inside userInfo.

    See more

    Declaration

    Swift

    public enum objKey : String

Notification Related Function

  • This function adds a specific type observer to a set of observers. Then post notification of the type immediately.

    See also

    addObserver only adds an observer, not post.

    Declaration

    Swift

    public func addObserverAndPost(type: MNCoreNotificationType, observer: AnyObject, selector: Selector)

    Parameters

    type

    The notification type.

    observer

    The object that is watching for notifications.

    selector

    The selector.

  • This function adds a specific type observer to a set of observers.

    See also

    addObserverAndPost not only adds an observer, also post immediately.

    Declaration

    Swift

    public func addObserver(type: MNCoreNotificationType, observer: AnyObject, selector: Selector)

    Parameters

    type

    The notification type.

    observer

    The object that is watching for notifications.

    selector

    The selector.

  • This function removes all observers.

    See also

    Use removeObserver if you want to remove only one type of observer.

    Declaration

    Swift

    public func removeAllObservers(observer: AnyObject)

    Parameters

    observer

    The objects that are not watching notifications.

  • This function removes a specific type of observer from the set of observers.

    See also

    Use removeAllObserver if you want to remove all observers.

    Declaration

    Swift

    public func removeObserver(type: MNCoreNotificationType, observer: AnyObject)

    Parameters

    type

    The notification type of the observer.

    observer

    The objects that are not watching notifications.

  • Declaration

    Swift

    public func postNotificationWithInfo(type: MNCoreNotificationType, userInfo: [AnyHashable : Any]?)
  • Declaration

    Swift

    public func postNotifications(_ type: MNCoreNotificationType)