<!--
{
  "availability" : [
    "iOS: 6.0.0 - 13.0.0",
    "iPadOS: 6.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPVolumeView/setRouteButtonImage(_:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPVolumeView(im)setRouteButtonImage:forState:"
  },
  "title" : "setRouteButtonImage(_:for:)"
}
-->

# setRouteButtonImage(_:for:)

Assigns a button image to the specified control states.

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

## Parameters

`image`

The image to associate with the specified states.

`state`

The control state with which to associate the image.

## Discussion

Use this to customize the appearance of the route button for various states such as enabled, disabled, and highlighted.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)