setPositionAdjustment(_:for:)
Returns the position adjustment for a given icon.
Declaration
func setPositionAdjustment(_ adjustment: UIOffset, for icon: UISearchBar.Icon)Parameters
- adjustment:
The offset to use for the icon identified by
icon. - icon:
An icon identifier constant.
Discussion
Use this method to adjust the position of an icon within the search text field.
See Also
Customizing the search bar appearance
backgroundImagebackgroundImage(for:barMetrics:)setBackgroundImage(_:for:barMetrics:)image(for:state:)setImage(_:for:state:)positionAdjustment(for:)inputAccessoryViewsearchFieldBackgroundImage(for:)setSearchFieldBackgroundImage(_:for:)searchFieldBackgroundPositionAdjustmentsearchTextPositionAdjustment