Skip to content

RtkNotificationBadgeView

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

MethodReturn TypeDescription
setBadgeCount(_:)VoidSets the badge count. Hides the badge at zero and displays "99+" for values over 99.

Usage Examples

Basic Usage

Swift
import RealtimeKitUI
let badge = RtkNotificationBadgeView()
badge.setBadgeCount(5)
view.addSubview(badge)

Reset badge

Swift
import RealtimeKitUI
let badge = RtkNotificationBadgeView()
badge.setBadgeCount(3)
view.addSubview(badge)
// Hide the badge by setting count to zero
badge.setBadgeCount(0)