Skip to content


Display in-app messages in a custom view controller

In-app messages can also be displayed within a custom view controller, which you pass to Braze. Braze will animate the customized in-app message in and out and handle analytics of the in-app message. The view controller must meet the following requirements:

  • It must be a subclass or an instance of ABKInAppMessageViewController.
  • The view of the returned view controller should be an instance of ABKInAppMessageView or its subclass.

The following UI delegate method is called every time an in-app message is offered to ABKInAppMessageViewController to allow the app to pass a custom view controller to Braze for in-app message display:

1
- (ABKInAppMessageViewController *)inAppMessageViewControllerWithInAppMessage:(ABKInAppMessage *)inAppMessage;
1
func inAppMessageViewControllerWithInAppMessage(inAppMessage: ABKInAppMessage!) -> ABKInAppMessageViewController!

Our in-app message view controllers are customizable. You can use subclasses or categories to customize the display or behavior of in-app messages.

Method declarations

For additional information, see the following header files:

Implementation samples

See ViewController.m and CustomInAppMessageViewController.m in the in-app message sample app.

HOW HELPFUL WAS THIS PAGE?
New Stuff!