Contents

backgroundImage(for:)

Returns the background image used for a button state.

Declaration

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

Parameters

  • state:

    The state that uses the background image. Possible values are described in State Swift.struct.

Return Value

The background image used for the specified state.

See Also

Managing images and tint color