setBackgroundImage(_:for:barMetrics:)
Sets the background image to use for a given bar position and set of metrics.
Declaration
func setBackgroundImage(_ backgroundImage: UIImage?, for barPosition: UIBarPosition, barMetrics: UIBarMetrics)Parameters
- backgroundImage:
The image to use for the specified location and metrics.
- barPosition:
The location of the navigation bar.
- barMetrics:
The metrics of the navigation bar.
Discussion
Resizable images will be stretched vertically, if necessary, for a position of UIBarPosition.topAttached.