---
title: "volumeThumbRect(forBounds:volumeSliderRect:value:)"
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: "mediaplayer/mpvolumeview/volumethumbrect(forbounds:volumesliderrect:value:)"
---

# volumeThumbRect(forBounds:volumeSliderRect:value:)

Returns the drawing rectangle for the volume slider’s thumb image.

## Declaration

```swift
func volumeThumbRect(forBounds bounds: CGRect, volumeSliderRect rect: CGRect, value: Float) -> CGRect
```

## Parameters

- `bounds`: The bounding rectangle of the thumb image.
- `rect`: The drawing rectangle for the receiver’s track, as returned by the doc://com.apple.mediaplayer/documentation/MediaPlayer/MPVolumeView/volumeSliderRect(forBounds:) method.
- `value`: The current value of the volume slider.

## Return Value

Return Value The computed drawing rectangle for the thumb image.

## Discussion

Discussion The rectangle you return should reflect the size of your thumb image and its current position on the slider’s track.

## 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)
- [volumeThumbImage(for:)](mediaplayer/mpvolumeview/volumethumbimage(for:).md)
