setBackButtonBackgroundImage(_:for:barMetrics:)
Sets the back button background image for a specified control state and bar metrics.
Declaration
func setBackButtonBackgroundImage(_ backgroundImage: UIImage?, for state: UIControl.State, barMetrics: UIBarMetrics)Parameters
- backgroundImage:
The image to use for the back button’s background.
- state:
A control state.
- barMetrics:
Bar metrics.
Discussion
This modifier applies only to navigation bar back buttons and is ignored by other buttons.
For good results, backgroundImage must be a stretchable image.