Legacy Customizations

Customize appearance information directly on the tab bar item object.

Overview

In iOS 13 and later, customize your tab bar items using the standardAppearance property. You may also continue to use these legacy accessors to override your tab bar item's appearance directly.

Topics

Configuring the Title

var titlePositionAdjustment: UIOffset

The offset to use to adjust the title position.

Configuring the Selection Image

var selectedImage: UIImage?

The image displayed when the tab bar item is selected.

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.

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

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

See Also

Customizing the Item's Appearance

var standardAppearance: UITabBarAppearance?

The appearance settings for this specific tab bar item.