Contents

setEnabled(_:withBadgeText:)

Sets the enabled state and the badge text for the toolbar item.

Declaration

func setEnabled(_ enabled: Bool, withBadgeText badgeText: String?)

Parameters

  • enabled:

    True to enable the toolbar item; otherwise False.

  • badgeText:

    String to display on the badge. Pass nil to remove the badge.

Discussion

The badge text is visible even when the toolbar item is disabled.

See Also

Controlling Toolbar Items