---
title: "thumbRect(forBounds:trackRect:value:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uislider/thumbrect(forbounds:trackrect:value:)"
---

# thumbRect(forBounds:trackRect:value:)

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

## Declaration

```swift
func thumbRect(forBounds bounds: CGRect, trackRect rect: CGRect, value: Float) -> CGRect
```

## Parameters

- `bounds`: The bounding rectangle of the slider.
- `rect`: The drawing rectangle for the slider’s track, as returned by the doc://com.apple.uikit/documentation/UIKit/UISlider/trackRect(forBounds:) method.
- `value`: The current value of the slider.

## Return Value

Return Value The computed drawing rectangle for the thumb image.

## Discussion

Discussion You do not call this method directly. Instead, you override it when you want to customize the thumb image’s drawing rectangle, returning a different rectangle. The rectangle you return must reflect the size of your thumb image and its current position on the slider’s track.

## See Also

### Overrides for subclasses

- [maximumValueImageRect(forBounds:)](uikit/uislider/maximumvalueimagerect(forbounds:).md)
- [minimumValueImageRect(forBounds:)](uikit/uislider/minimumvalueimagerect(forbounds:).md)
- [trackRect(forBounds:)](uikit/uislider/trackrect(forbounds:).md)
