Skip to content

RtkNotificationBadgeView

Last updated View as MarkdownAgent setup

A small circular badge view that displays a notification count. Hides automatically when the count is zero and shows "99+" for counts over 99.

Methods

Method Return Type Description
setBadgeCount(_:) Void Sets the badge count. Hides the badge at zero and displays "99+" for values over 99.

Usage Examples

Basic Usage

import RealtimeKitUI

let badge = RtkNotificationBadgeView()
badge.setBadgeCount(5)
view.addSubview(badge)

Reset badge

import RealtimeKitUI

let badge = RtkNotificationBadgeView()
badge.setBadgeCount(3)
view.addSubview(badge)

// Hide the badge by setting count to zero
badge.setBadgeCount(0)

Was this helpful?