Conforms to NSObject
Declared in UAInAppMessageControllerDelegate.h

Overview

Delegate protocol for providing custom UI to the UAInAppMessageController.

Instance Methods

messageView:animateInWithParentView:completionHandler:

Display animation hook. Use this event to perform custom animation for the message view. At the time this method is called, the message view will already be added as a sub view of the parent, with no positioning other than that dictated by its geometry or layout cronstraints. It is the delegate’s responsibility to ensure that it animates to its final display position, which would typically be a transition from offscreen coordinates to its proper display coordinates.

- (void)messageView:(UIView *)messageView animateInWithParentView:(UIView *)parentView completionHandler:(void ( ^ ) ( void ))completionHandler

Parameters

messageView

The associated message view.

parentView

The parent view the message view has been added to.

completionHandler

A completion handler to call once the animation is complete.

Declared In

UAInAppMessageControllerDelegate.h

messageView:animateOutWithParentView:completionHandler:

Dismiss animation hook. Use this event to perform custom animation for the message view. It is the delegate’s responsibility to ensure that it animates to its final dismissal position, which would typically be offscreen coordinates.

- (void)messageView:(UIView *)messageView animateOutWithParentView:(UIView *)parentView completionHandler:(void ( ^ ) ( void ))completionHandler

Parameters

messageView

The associated message view.

parentView

The parent view the message view has been added to.

completionHandler

A completion handler to call once the animation is complete.

Declared In

UAInAppMessageControllerDelegate.h

messageView:buttonAtIndex:

Returns the button corresponding to the indexed action associated with the message. This button will be automatically configured for touch events in the controller.

- (UIControl *)messageView:(UIView *)messageView buttonAtIndex:(NSUInteger)index

Parameters

messageView

The custom message view.

index

The index of the action.

Return Value

An instance of UIControl.

Declared In

UAInAppMessageControllerDelegate.h

messageView:didChangeTouchState:

Indicates that the message view has changed touch state, meaning that the message view has been tapped and touch is either down or up. Use this event to update the view accordingly, such as by inverting colors.

- (void)messageView:(UIView *)messageView didChangeTouchState:(BOOL)touchDown

Parameters

messageView

The message view.

touchDown

YES if the event represents a touch down, NO if it represents a touch up.

Declared In

UAInAppMessageControllerDelegate.h

viewForMessage:parentView:

Returns a view configured with data from the provided message. Use this method to configure your custom view with colors, alert text, etc.

- (UIView *)viewForMessage:(UAInAppMessage *)message parentView:(UIView *)parentView

Parameters

message

The associated in-app message.

parentView

The parent view the messageView will be embedded in

Return Value

A configured instance of UIView.

Declared In

UAInAppMessageControllerDelegate.h