positionAdjustment(for:)
Returns the position adjustment for a given icon.
Declaration
func positionAdjustment(for icon: UISearchBar.Icon) -> UIOffsetParameters
- icon:
An icon identifier constant.
Return Value
The position adjustment for the icon identified by icon.
Discussion
The offset is used 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:)setPositionAdjustment(_:for:)inputAccessoryViewsearchFieldBackgroundImage(for:)setSearchFieldBackgroundImage(_:for:)searchFieldBackgroundPositionAdjustmentsearchTextPositionAdjustment