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

Instance Methods

(void) - setUp
 
(void) - setUpUI
 
(void) - registerTableViewCellClasses
 
(ABKNFBaseCardCell *) - dequeueCellFromTableView:forIndexPath:forCard:
 
(NSString *) - findCellIdentifierWithCard:
 
(NSString *) - localizedAppboyFeedString:
 
(void) - handleCardClick:
 
- Instance Methods inherited from <ABKBaseNewsFeedCellDelegate>
(void) - refreshTableViewCellHeights
 

Class Methods

(instancetype) + getNavigationFeedViewController
 

Properties

IBOutlet UIView * emptyFeedView
 
IBOutlet UILabel * emptyFeedLabel
 
BOOL disableUnreadIndicator
 
ABKCardCategory categories
 
NSArray< ABKCard * > * cards
 
NSMutableSet< NSString * > * cardImpressions
 
NSTimeInterval cacheTimeout
 
id constraintWarningValue
 

Method Documentation

- (ABKNFBaseCardCell *) dequeueCellFromTableView: (UITableView *)  tableView
forIndexPath: (NSIndexPath *)  indexPath
forCard: (ABKCard *)  card 
Parameters
tableViewThe table view which need the cell to diplay the card UI.
indexPathThe index path of the card UI in the table view.
cardThe card model for the cell.

This method dequeues and returns the corresponding card cell based on card type from the given table view.

- (NSString *) findCellIdentifierWithCard: (ABKCard *)  card

Given a content card return the type identifier for the above registration.

+ (instancetype) getNavigationFeedViewController

This method returns an instance of ABKNewsFeedTableViewController. You can call it to get a News Feed view controller for your navigation controller.

Warning
To use a custom News Feed view controller, instantiate your own subclass instead (e.g. via alloc / init).
- (void) handleCardClick: (ABKCard *)  card

This method handles the user's click on the card.

To do custom handling with the card clicks, you can override this method in a subclass. You also need to call [card logCardClicked] manually inside of your new method to send the click event to the Braze server.

- (NSString *) localizedAppboyFeedString: (NSString *)  key

This method returns the localized string from AppboyFeedLocalizable.strings file. You can easily override the localized string by adding the keys and the translations to your own Localizable.strings file.

To do custom handling with the Appboy localized string, you can override this method in a subclass.

- (void) registerTableViewCellClasses

Registers Cell classes with the tableview, override this method when implementing custom cell classes to register the new subclasses.

- (void) setUp

Initialization that is done for all ABKNewsFeedTableViewControllers with or without storyboard/XIB.

- (void) setUpUI

Initialization that is done for ABKNewsFeedTableViewControllers with programmatic layout only.

Property Documentation

- (NSTimeInterval) cacheTimeout
readwriteatomic

This property defines the timeout for stored News Feed cards in the Braze SDK. If the cards in the Braze SDK are older than this value, the News Feed view controller will request a News Feed update.

The default value is 60 seconds.

- (NSMutableSet<NSString *>*) cardImpressions
readwritenonatomicassign

This set stores the card IDs for which the impressions have been logged.

- (NSArray<ABKCard *>*) cards
readwritenonatomicassign

This property shows the cards displayed in the News Feed. Please note that the News Feed view controller listens to the ABKFeedUpdatedNotification notification from the Braze SDK, which will update the value of this property.

- (ABKCardCategory) categories
readwritenonatomicassign

This property indicates which categories of cards the news feed is displaying. Setting this property will automatically update the news feed page and only display cards in the given categories. This method won't request refresh of cards from the Braze server, but only look into cards that are cached in the SDK.

- (BOOL) disableUnreadIndicator
readwritenonatomicassign

This property allows you to enable or disable the unread indicator on the news feed. The default value is NO, which will enable the displaying of the unread indicator on cards.

- (IBOutlet UIView*) emptyFeedView
readwritenonatomicassign

UI elements which are used in the News Feed table view. You can find them in the News Feed Card Storyboard.