---
title: "setMinimumTrackImage(_:for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uislider/setminimumtrackimage(_:for:)"
---

# setMinimumTrackImage(_:for:)

Assigns a minimum track image to the specified control states.

## Declaration

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

## Parameters

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

## Discussion

Discussion Because the movement of the slider’s thumb changes the width of the area occupied by the minimum track image, the image width changes accordingly. To accommodate this requirement, specify track images as stretchable images that can grow or shrink to fill the available space. For information about how to create stretchable images, see UIImage. When you specify a custom minimum track image, the slider ignores the custom minimum track tint color, if any. Sliders respond to user interaction with dynamic effects and appearance. If you use images to customize the appearance of the track, then the slider doesn’t apply the dynamic effects or alter the appearance. important: This method isn’t available when the user interface idiom is UIUserInterfaceIdiom.mac and behavioralStyle is UIBehavioralStyle.mac — calling it while in this state throws an exception.

## See Also

### Changing the slider’s appearance

- [minimumValueImage](uikit/uislider/minimumvalueimage.md)
- [maximumValueImage](uikit/uislider/maximumvalueimage.md)
- [minimumTrackTintColor](uikit/uislider/minimumtracktintcolor.md)
- [currentMinimumTrackImage](uikit/uislider/currentminimumtrackimage.md)
- [minimumTrackImage(for:)](uikit/uislider/minimumtrackimage(for:).md)
- [maximumTrackTintColor](uikit/uislider/maximumtracktintcolor.md)
- [currentMaximumTrackImage](uikit/uislider/currentmaximumtrackimage.md)
- [maximumTrackImage(for:)](uikit/uislider/maximumtrackimage(for:).md)
- [setMaximumTrackImage(_:for:)](uikit/uislider/setmaximumtrackimage(_:for:).md)
- [thumbTintColor](uikit/uislider/thumbtintcolor.md)
- [currentThumbImage](uikit/uislider/currentthumbimage.md)
- [thumbImage(for:)](uikit/uislider/thumbimage(for:).md)
- [setThumbImage(_:for:)](uikit/uislider/setthumbimage(_:for:).md)
