Instance Method

backgroundImage(for:barMetrics:)

Returns the background image for a given state and bar metrics.

Declaration

func backgroundImage(for state: UIControl.State, barMetrics: UIBarMetrics) -> UIImage?

Parameters

state

A control state.

barMetrics

Bar metrics.

Return Value

The background image for state and barMetrics.

Discussion

See Also

Customizing Appearance

func setBackgroundImage(UIImage?, for: UIControl.State, barMetrics: UIBarMetrics)

Sets the background image for a given state and bar metrics.

func dividerImage(forLeftSegmentState: UIControl.State, rightSegmentState: UIControl.State, barMetrics: UIBarMetrics) -> UIImage?

Returns the divider image used for a given combination of left and right segment states and bar metrics.

func setDividerImage(UIImage?, forLeftSegmentState: UIControl.State, rightSegmentState: UIControl.State, barMetrics: UIBarMetrics)

Sets the divider image used for a given combination of left and right segment states and bar metrics.

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

Returns the text attributes of the title for a given control state.

func setTitleTextAttributes([NSAttributedString.Key : Any]?, for: UIControl.State)

Sets the text attributes of the title for a given control state.