Braze iOS SDK
Documentation for the Braze iOS SDK
 All Classes Functions Properties
Instance Methods | Properties | List of all members
ABKInAppMessageButton Class Reference

Instance Methods

(void) - setButtonClickAction:withURI:
 

Properties

NSString * buttonText
 
UIColor * buttonBackgroundColor
 
UIColor * buttonBorderColor
 
UIColor * buttonTextColor
 
UIFont * buttonTextFont
 
ABKInAppMessageClickActionType buttonClickActionType
 
NSURL * buttonClickedURI
 
BOOL buttonOpenUrlInWebView
 
NSInteger buttonID
 

Method Documentation

- (void) setButtonClickAction: (ABKInAppMessageClickActionType)  clickActionType
withURI: (nullable NSURL *)  uri 

This method will set the buttonClickActionType property.

When clickActionType is ABKInAppMessageRedirectToURI, the parameter uri cannot be nil, and the value will be passed to buttonClickedURI. When clickActionType is ABKInAppMessageDisplayNewsFeed or ABKInAppMessageNoneClickAction, the parameter uri will be ignored, and property uri will be set to nil.

Property Documentation

- (UIColor*) buttonBackgroundColor
readwriteatomicstrong

This property defines the button's background color.

- (UIColor*) buttonBorderColor
readwriteatomicstrong

This property defines the button's border color. If this property is not sent from the server, the background color is used.

- (ABKInAppMessageClickActionType) buttonClickActionType
readatomicassign

This property defines the action that will be performed when the button is clicked. See the ABKInAppMessageClickActionType enum documentation in ABKInAppMessage.h offers additional details.

- (NSURL*) buttonClickedURI
readatomiccopy

When the button's buttonClickActionType is ABKInAppMessageRedirectToURI, clicking on the button will redirect to the uri defined in this property.

This property can be a HTTP URI or a protocol URI.

- (NSInteger) buttonID
readatomicassign

This property defines the button's ID. Button's ID is used to track user's clicking action and used for corresponding data analytics.

- (BOOL) buttonOpenUrlInWebView
readwriteatomic

When the button's buttonClickActionType is ABKInAppMessageRedirectToURI, if the property is set to YES, the URI will be opened in a modal WKWebView inside the app. If this property is set to NO, the URI will be opened by the OS and web URIs will be opened in an external web browser app.

This property defaults to NO.

- (NSString*) buttonText
readwriteatomiccopy

This property defines the button title text in UIControlStateNormal. Setting this property will also change the button title text.

- (UIColor*) buttonTextColor
readwriteatomicstrong

This property defines the button's title color in UIControlStateNormal. Setting this property will also change the button title color.

- (UIFont*) buttonTextFont
readwriteatomiccopy

This property defines the button title font in UIControlStateNormal. Please set this property before the in-app message is displayed, or the displayed in-app message will not apply the font.