Instance Method

badgeTextAttributes(for:)

Retrieves the custom text attributes associated with the item's badge text.

Declaration

func badgeTextAttributes(for state: UIControl.State) -> [NSAttributedString.Key : Any]?

Parameters

state

The state that uses the badge text. The possible values are described in UIControl.State.

Return Value

The attributed string attributes applied to the badge for the specified state. For a list of attributes, see Character Attributes in NSAttributedString.

See Also

Configuring the Badge

var badgeValue: String?

Text that is displayed in the upper-right corner of the item with a surrounding red oval.

var badgeColor: UIColor?

The background color to apply to the badge.