UAInAppMessageControllerDefaultDelegate Class Reference
Inherits from | NSObject |
Conforms to | UAInAppMessageControllerDelegate |
Declared in | UAInAppMessageControllerDefaultDelegate.h |
Overview
Default instance of UAInAppMessageControllerDelegate, used internally by UAInAppMessageController to implement default UI and behavior.
Instance Methods
initWithMessage:
Initializer for UAInAppMessageControllerDefaultDelegate.
- (instancetype)initWithMessage:(UAInAppMessage *)message
Parameters
- message
The associated in-app message.
Return Value
An instance of UAInAppMessageControllerDefaultDelegate.
Declared In
UAInAppMessageControllerDefaultDelegate.h
messageView:animateInWithParentView:completionHandler:
Animates the message view onto the screen by temporarliy moving it offscreen, and easing in-out to fit within the top or bottom position over 0.2 seconds. This method does not assume the passed message view is of the UAInAppMessageView class, and so can function as a default for custom views as well.
- (void)messageView:(UIView *)messageView animateInWithParentView:(UIView *)parentView completionHandler:(void ( ^ ) ( void ))completionHandler
Parameters
- messageView
The message view to be animated.
- parentView
The parent view the message view is embedded in.
- completionHandler
A completion handler called when the animation is complete.
Declared In
UAInAppMessageControllerDefaultDelegate.h
messageView:animateOutWithParentView:completionHandler:
Animates the message view off the screen in the direction it was displayed from, easing in-out over 0.2 seconds.
- (void)messageView:(UIView *)messageView animateOutWithParentView:(UIView *)parentView completionHandler:(void ( ^ ) ( void ))completionHandler
Parameters
- messageView
The message view to be animated.
- parentView
The parent view the message view is embedded in.
- completionHandler
A completion handler called when the animation is complete.
Declared In
UAInAppMessageControllerDefaultDelegate.h
messageView:buttonAtIndex:
Returns the button matching an associated action’s index. e.g. for a two-button layout, the first would be index 0, and the second would be index 1.
- (UIControl *)messageView:(UIView *)messageView buttonAtIndex:(NSUInteger)index
Parameters
- messageView
The messageView, in this case a UAInAppMessageView.
- index
The button’s index.
Return Value
The UIControl instance corresponding to the action index, in this case “button1” or “button2”.
Declared In
UAInAppMessageControllerDefaultDelegate.h
messageView:didChangeTouchState:
Handles changes to highlight state by inverting the primary and secondary colors in the message view
- (void)messageView:(UIView *)messageView didChangeTouchState:(BOOL)touchDown
Parameters
- messageView
The messageView, in this case a UAInAppMessageView.
- touchDown
The touch state. A
YES
will result in inverted primary/secondary colors, whereas aNO
will result in non-inverted colors.
Declared In
UAInAppMessageControllerDefaultDelegate.h
viewForMessage:parentView:
Builds, lays out, and configures an instance of UAInAppMessageView.
- (UIView *)viewForMessage:(UAInAppMessage *)message parentView:(UIView *)parentView
Parameters
- message
The associated in-app message.
- parentView
The parent view the UAInAppMessageView will be embedded in.
Return Value
The fully configured and laid out instance of UAInAppMessageView.
Declared In
UAInAppMessageControllerDefaultDelegate.h