Content Cards View Controller Integration

Content Cards can be integrated with two view controller contexts: Navigation or Modal.

Example of pushing a ABKContentCardsTableViewController instance into a navigation controller:

1
2
3
4
ABKContentCardsTableViewController *contentCards = [ABKContentCardsTableViewController getNavigationFeedViewController];
contentCards.title = "Content Cards Title";
contentCards.disableUnreadIndicator = YES;
[self.navigationController pushViewController:contentCards animated:YES];
1
2
3
4
let contentCards = ABKContentCardsTableViewController()
contentCards.title = "Content Cards Title"
contentCards.disableUnreadIndicator = true
navigationController?.pushViewController(contentCards, animated: true)

This modal is used to present the view controller in a modal view, with a navigation bar on top and a Done button on the right side of the bar.

1
2
3
4
ABKContentCardsViewController *contentCards = [[ABKContentCardsViewController alloc] init];
contentCards.contentCardsViewController.title = "Content Cards Title";
contentCards.contentCardsViewController.disableUnreadIndicator = YES;
[self.navigationController presentViewController:contentCards animated:YES completion:nil];
1
2
3
4
let contentCards = ABKContentCardsViewController()
contentCards.contentCardsViewController.title = "Content Cards Title"
contentCards.contentCardsViewController.disableUnreadIndicator = true
self.present(contentCards, animated: true, completion: nil)

For examples of these view controllers, check out our Content Cards sample app.

Overriding Default Images

Braze allows clients to replace existing default images with their own custom images. To accomplish this, create a new png file with the custom image and add it to the app’s image bundle. Then, rename the file with the image’s name (see below) to override the default image in our library. Images available for override in Content Cards include:

  • Placeholder image: appboy_cc_noimage_lrg.

Customizing the Content Cards Feed

You can create your own Content Cards interface by extending ABKContentCardsTableViewController to customize all UI elements and Content Cards behavior. Alternatively, you can create a completely custom view controller and subscribe for data updates. In the latter case, you would need to log all view events, dismissed events, and clicks manually.

WAS THIS PAGE HELPFUL?
New Stuff!