Contents

image(for:state:)

Returns the image for a given search bar icon type and control state.

Declaration

func image(for icon: UISearchBar.Icon, state: UIControl.State) -> UIImage?

Parameters

  • icon:

    An icon identifier constant.

  • state:

    A control state.

    Valid states are Normal and Disabled.

Return Value

The image used for the search bar icon identified by icon in the state identified by state.

See Also

Customizing the search bar appearance