UAMessageCenterMessageViewProtocol

@protocol UAMessageCenterMessageViewProtocol

Protocol to be implemented by internal message center message view controllers.

  • The UAInboxMessage being displayed.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) UAInboxMessage *_Nonnull message;

    Swift

    var message: UAInboxMessage! { get }
  • Block that will be invoked when this class receives a closeWindow message from the webView.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) void (^_Nonnull)(BOOL) closeBlock;

    Swift

    var closeBlock: ((Int32) -> Void)! { get set }
  • Load a UAInboxMessage by message ID.

    Declaration

    Objective-C

    - (void)loadMessageForID:(nonnull NSString *)messageID
               onlyIfChanged:(BOOL)onlyIfChanged
                     onError:(nullable void (^)(void))errorCompletion;

    Swift

    func loadMessage(forID messageID: Any!, onlyIfChanged: Any!, onError errorCompletion: (() -> Void)? = nil)

    Parameters

    messageID

    The message ID of the message.

    onlyIfChanged

    Only load the message if the message has changed

    errorCompletion

    Called on loading error

  • Sets a custom message loading indicator view and animation. Will show the default loading indicator and animation if left unset.

    Declaration

    Objective-C

    - (void)setLoadingIndicatorView:(nonnull UIView *)loadingIndicatorView
                         animations:(nonnull void (^)(void))animations;

    Swift

    optional func setLoadingIndicatorView(_ loadingIndicatorView: Any!, animations: (() -> Void)!)

    Parameters

    loadingIndicatorView

    Loading indicator view.

    animations

    Block to execute upon displaying loading indicator view.