Contents

setImage(_:for:state:)

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

Declaration

func setImage(_ iconImage: UIImage?, for icon: UISearchBar.Icon, state: UIControl.State)

Parameters

  • iconImage:

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

  • icon:

    An icon identifier constant.

  • state:

    A control state.

    Valid states are Normal and Disabled.

See Also

Customizing the search bar appearance