UADefaultMessageCenter

@interface UADefaultMessageCenter : NSObject

The UADefaultMessageCenter class provides a default implementation of a message center, as well as a high-level interface for its configuration and display.

  • The title of the message center.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *title;

    Swift

    var title: String! { get set }
  • The style to apply to the default message center.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) UADefaultMessageCenterStyle *style;

    Swift

    var style: UADefaultMessageCenterStyle! { get set }
  • An optional predicate for filtering messages.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSPredicate *filter;

    Swift

    var filter: NSPredicate! { get set }
  • Factory method for creating message center with style specified in a config.

    Declaration

    Objective-C

    + (instancetype)messageCenterWithConfig:(UAConfig *)config;

    Swift

    convenience init!(config: UAConfig!)

    Return Value

    A Message Center instance initialized with the style specified in the provided config.

  • Display the message center.

    Declaration

    Objective-C

    - (void)display:(BOOL)animated;

    Swift

    func display(_ animated: Bool)

    Parameters

    animated

    Whether the transition should be animated.

  • Display the message center with animation.

    Declaration

    Objective-C

    - (void)display;

    Swift

    func display()
  • Display the given message.

    @deprecated Deprecated - to be removed in SDK version 9.0

    Declaration

    Objective-C

    - (void)displayMessage:(UAInboxMessage *)message animated:(BOOL)animated;

    Swift

    func display(_ message: UAInboxMessage!, animated: Bool)

    Parameters

    message

    The message.

    animated

    Whether the transition should be animated.

  • Display the given message.

    @pararm messageID The messageID of the message. - parameter: animated Whether the transition should be animated.

    Declaration

    Objective-C

    - (void)displayMessageForID:(NSString *)messageID animated:(BOOL)animated;

    Swift

    func displayMessage(forID messageID: String!, animated: Bool)

    Parameters

    messageID

    The messageID of the message.

    animated

    Whether the transition should be animated.

  • Display the given message without animation.

    @pararm message The message.

    @deprecated Deprecated - to be removed in SDK version 9.0

    Declaration

    Objective-C

    - (void)displayMessage:(UAInboxMessage *)message;

    Swift

    func display(_ message: UAInboxMessage!)

    Parameters

    message

    The message.

  • Display the given message without animation.

    @pararm messageID The messageID of the message.

    Declaration

    Objective-C

    - (void)displayMessageForID:(NSString *)messageID;

    Swift

    func displayMessage(forID messageID: String!)

    Parameters

    messageID

    The messageID of the message.

  • Dismiss the message center.

    Declaration

    Objective-C

    - (void)dismiss:(BOOL)animated;

    Swift

    func dismiss(_ animated: Bool)

    Parameters

    animated

    Whether the transition should be animated.

  • Dismiss the message center with animation.

    Declaration

    Objective-C

    - (void)dismiss;

    Swift

    func dismiss()