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

# routeButtonImage(for:)

Returns the button image associated with the specified control state.

## Declaration

```swift
func routeButtonImage(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 button 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 Use this method to retrieve the corresponding button image for a specific state.

## See Also

### Deprecated

- [volumeWarningSliderImage](mediaplayer/mpvolumeview/volumewarningsliderimage.md)
- [showsRouteButton](mediaplayer/mpvolumeview/showsroutebutton.md)
- [areWirelessRoutesAvailable](mediaplayer/mpvolumeview/arewirelessroutesavailable.md)
- [isWirelessRouteActive](mediaplayer/mpvolumeview/iswirelessrouteactive.md)
- [routeButtonRect(forBounds:)](mediaplayer/mpvolumeview/routebuttonrect(forbounds:).md)
- [setRouteButtonImage(_:for:)](mediaplayer/mpvolumeview/setroutebuttonimage(_:for:).md)
