Class

UITabBarItemStateAppearance

A data object containing the specific customizations for tab bar items in a particular state.

Declaration

class UITabBarItemStateAppearance : NSObject

Overview

Use a UITabBarItemStateAppearance object to customize the appearance of your tab bar items and the badges they display. Don't create UITabBarItemStateAppearance objects yourself. Instead, create a UITabBarItemAppearance object and use its properties to fetch the appearance attributes for tab bar items in a particular state. For example, to set the attributes for items in the normal state, configure the object in the normal property.

Topics

Configuring the Item's Title

var titleTextAttributes: [NSAttributedString.Key : Any]

String attributes to apply to the text of the tab bar item's title.

var titlePositionAdjustment: UIOffset

The additional amount by which to offset the title horizontally and vertically.

Tinting the Item's Icon

var iconColor: UIColor?

The color of item icons.

Configuring the Badge Appearance

var badgeTextAttributes: [NSAttributedString.Key : Any]

String attributes to apply to the text of the item's badge.

var badgeBackgroundColor: UIColor?

The background color of the badge.

var badgeTitlePositionAdjustment: UIOffset

The additional amount by which to offset the badge's title horizontally and vertically.

var badgePositionAdjustment: UIOffset

The additional amount by which to offset the badge horizontally and vertically.

Relationships

Inherits From

Conforms To

See Also

Tab Bar Appearance

class UITabBarAppearance

An object for customizing the appearance of a tab bar.

class UITabBarItemAppearance

An object for customizing the appearance of tab bar items.