---
title: "volumeThumbImage(for:)"
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: "mediaplayer/mpvolumeview/volumethumbimage(for:)"
---

# volumeThumbImage(for:)

Returns the thumb image associated with the specified control state.

## Declaration

```swift
func volumeThumbImage(for state: UIControl.State) -> UIImage?
```

## Parameters

- `state`: The control state whose thumb image you want. You should specify only one control state value for this parameter.

## Return Value

Return Value The thumb image associated with the specified state, or nil if an appropriate image could not be retrieved. This method might return nil if you specify multiple control states in the state parameter.

## 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)
- [setVolumeThumbImage(_:for:)](mediaplayer/mpvolumeview/setvolumethumbimage(_:for:).md)
- [volumeSliderRect(forBounds:)](mediaplayer/mpvolumeview/volumesliderrect(forbounds:).md)
- [volumeThumbRect(forBounds:volumeSliderRect:value:)](mediaplayer/mpvolumeview/volumethumbrect(forbounds:volumesliderrect:value:).md)
