Class

UIBarButtonItemAppearance

An object for customizing the appearance of bar button items.

Declaration

class UIBarButtonItemAppearance : NSObject

Overview

Use a UIBarButtonItemAppearance object to customize the appearance of a bar button item in each of its possible states. You can customize the appearance differently for different states. For example, you might apply different colors to the button's title in the normal and highlighted states.

Topics

Creating a Bar Button Item Appearance Object

init(style: UIBarButtonItem.Style)

Creates an appearance with default values that are appropriate for the specified button style.

init()

Creates an appearance object with default values that are appropriate for a plain button.

Resetting the Appearance Properties

func configureWithDefault(for: UIBarButtonItem.Style)

Configures the bar button item appearance object with appropriate values for the specified button style.

Configuring Attributes for Different Button States

var normal: UIBarButtonItemStateAppearance

The appearance data to apply to the button when it is in the normal state.

var disabled: UIBarButtonItemStateAppearance

The appearance data to apply to the button when it is in the disabled state.

var highlighted: UIBarButtonItemStateAppearance

The appearance data to apply to the button when it is in the highlighted state.

var focused: UIBarButtonItemStateAppearance

The appearance data to apply to the button when it is focused.

Instance Methods

Relationships

Inherits From

See Also

Shared Appearance

class UIBarAppearance

An object for customizing the basic appearance of system bars.

class UIBarButtonItemStateAppearance

A data object containing the specific customizations for a bar button item in a particular state.