---
title: "setVolumeThumbImage(_:for:)"
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: "mediaplayer/mpvolumeview/setvolumethumbimage(_:for:)"
---

# setVolumeThumbImage(_:for:)

Assigns a thumb image to the specified control states.

## Declaration

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

## Parameters

- `image`: The thumb image to associate with the specified states.
- `state`: The control state with which to associate the image.

## Discussion

Discussion For a description of slider and thumb images, see Customizing the volume slider’s appearance.

## See Also

### Customizing the volume slider

- [maximumVolumeSliderImage(for:)](mediaplayer/mpvolumeview/maximumvolumesliderimage(for:).md)
- [minimumVolumeSliderImage(for:)](mediaplayer/mpvolumeview/minimumvolumesliderimage(for:).md)
- [setMaximumVolumeSliderImage(_:for:)](mediaplayer/mpvolumeview/setmaximumvolumesliderimage(_:for:).md)
- [setMinimumVolumeSliderImage(_:for:)](mediaplayer/mpvolumeview/setminimumvolumesliderimage(_:for:).md)
- [volumeSliderRect(forBounds:)](mediaplayer/mpvolumeview/volumesliderrect(forbounds:).md)
- [volumeThumbImage(for:)](mediaplayer/mpvolumeview/volumethumbimage(for:).md)
- [volumeThumbRect(forBounds:volumeSliderRect:value:)](mediaplayer/mpvolumeview/volumethumbrect(forbounds:volumesliderrect:value:).md)
