---
title: "setBackgroundImage(_:for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uistepper/setbackgroundimage(_:for:)"
---

# setBackgroundImage(_:for:)

Sets the background image for the control when it’s in the specified state.

## Declaration

```swift
func setBackgroundImage(_ image: UIImage?, for state: UIControl.State)
```

## Parameters

- `image`: The background image to use for the specified state.
- `state`: The control state in which you want to display the image.

## Discussion

Discussion For good results, image must be a stretchable image.

## See Also

### Customizing appearance

- [backgroundImage(for:)](uikit/uistepper/backgroundimage(for:).md)
- [decrementImage(for:)](uikit/uistepper/decrementimage(for:).md)
- [setDecrementImage(_:for:)](uikit/uistepper/setdecrementimage(_:for:).md)
- [dividerImage(forLeftSegmentState:rightSegmentState:)](uikit/uistepper/dividerimage(forleftsegmentstate:rightsegmentstate:).md)
- [setDividerImage(_:forLeftSegmentState:rightSegmentState:)](uikit/uistepper/setdividerimage(_:forleftsegmentstate:rightsegmentstate:).md)
- [incrementImage(for:)](uikit/uistepper/incrementimage(for:).md)
- [setIncrementImage(_:for:)](uikit/uistepper/setincrementimage(_:for:).md)
