Skip to content

Read and unread indicators

Content Cards contain a blue line at the bottom of the card which indicates whether or not the card has been viewed. This article provides examples of modifying this behavior. For more information on customizing Content Cards UI attributes, refer to Customizing Feed.

Two Content Cards displayed side by side. The card on the left has a blue line at the bottom, indicating it has not been seen. The card on the right does not have a blue line, indicating it has already been seen.

Disabling the unviewed indicator

Disable the unviewed indicator line by setting the attributes.cellAttributes.unviewedIndicatorColor property in your Attributes struct to .clear.

Customizing the unviewed indicator

The color of the unviewed indicator can be set by assigning a value to the tint color of your BrazeContentCardUI.ViewController instance:

1
2
let viewController = BrazeContentCardUI.ViewController(braze: AppDelegate.braze)
viewController.view.tintColor = .systemGreen
1
2
BRZContentCardUIViewController *viewController = [[BRZContentCardUIViewController alloc] initWithBraze:AppDelegate.braze];
[viewController.view setTintColor:[UIColor systemGreenColor]];

However, if you wish to modify only the unviewed indicator, you can access the unviewedIndicatorColor property of your BrazeContentCardUI.ViewController.Attributes struct. If you utilize Braze’s UITableViewCell implementations, you should access the property before the cell is drawn.

For example, to set the color of the unviewed indicator to red:

1
2
3
4
var attributes = BrazeContentCardUI.ViewController.Attributes.defaults
attributes.cellAttributes.unviewedIndicatorColor = .red

let viewController = BrazeContentCardUI.ViewController(braze: AppDelegate.braze, attributes: attributes)
WAS THIS PAGE HELPFUL?
New Stuff!