Sets the background image for a given state and bar metrics.
- iOS 5.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The background image to use for
A control state.
background is an image returned from
resizable, the cap widths are calculated from that information.
background is not an image returned from
resizable, the cap width is calculated by subtracting one from the image's width then dividing by 2. The cap widths are used as the margins for text placement. To adjust the margin, use the margin adjustment methods.
For more details, see