News Feed Integration Overview
Integrating the view controller
ABKNewsFeedViewController will display the Braze News Feed.
You have a great deal of flexibility in how you choose to display the view controllers. There are different versions of the view controllers to accommodate different navigation structures.
The News Feed that is called by the default behavior of an in-app message click will not respect any delegates that you set for the News Feed. If you want to respect that, you must set the delegate on
ABKInAppMessageUIControllerand implement the
News Feed View Controller Integration Options
The News Feed can be integrated with 2 view controller contexts, either in code or via a storyboard implementation.
Navigation Context – ABKFeedViewControllerNavigationContext
1 2 ABKNewsFeedTableViewController *newsFeed = [[ABKNewsFeedTableViewController alloc] init]; [self.navigationController pushViewController:newsFeed animated:YES];
1 2 let newsFeed = ABKNewsFeedTableViewController() self.navigationController?.pushViewController(newsFeed, animated: true)
To customize the navigation bar’s title, set the title property of the
Modal Context – ABKFeedViewControllerModalContext
- 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
- Set the modal’s title via the embedded
- If a delegate is NOT set the Done button will dismiss the modal view
- If a delegate is set the Done button will call the delegate, and the delegate itself will be responsible for dismissing the view
1 2 ABKNewsFeedViewController *newsFeed = [[ABKNewsFeedViewController alloc] init]; [self presentViewController:newsFeed animated:YES completion:nil];
1 2 let newsFeed = ABKNewsFeedViewController() self.present(newsFeed, animated: true, completion: nil)
The News Feed sample app contains examples of the view controllers.