---
title: AVRoutePickerView
framework: avkit
role: symbol
role_heading: Class
path: avkit/avroutepickerview
---

# AVRoutePickerView

A view that presents a list of nearby media receivers.

## Declaration

```swift
class AVRoutePickerView
```

## Overview

Overview This view represents a button that users tap to stream audio/video content to a media receiver, such as a Mac or Apple TV.

When the user taps the button, the system presents a popover that displays all of the nearby AirPlay devices that can receive and play back media. If your app prefers video content, the system displays video-capable devices higher in the list.

In iOS 16 and later, you can add devices to the list that implement custom protocols. For more information about displaying third-party routes, see AVRouting. Configure the button’s text, color, and media preference The following code example creates the view alongside custom text: HStack {     Text("Choose output device")         .font(.title)         .frame(maxWidth: .infinity, alignment: .center)         .fixedSize()         .padding(.leading)

if routeDetected {         DevicePickerView() // See implementation below.         .frame(width: 60, height: 60)         .padding(.trailing)     } } Your app configures the button’s color scheme and indicates whether your app prefers video content, as the following code demonstrates: struct DevicePickerView: UIViewRepresentable {     func makeUIView(context: Context) -> UIView {         let routePickerView = AVRoutePickerView()

// Configure the button's color.         routePickerView.delegate = context.coordinator         routePickerView.backgroundColor = UIColor.white         routePickerView.tintColor = UIColor.black

// Indicate whether your app prefers video content.         routePickerView.prioritizesVideoDevices = true

return routePickerView

## Topics

### Configuring the delegate

- [delegate](avkit/avroutepickerview/delegate.md)
- [AVRoutePickerViewDelegate](avkit/avroutepickerviewdelegate.md)

### Configuring the route picker view

- [activeTintColor](avkit/avroutepickerview/activetintcolor.md)
- [isRoutePickerButtonBordered](avkit/avroutepickerview/isroutepickerbuttonbordered.md)
- [prioritizesVideoDevices](avkit/avroutepickerview/prioritizesvideodevices.md)
- [routePickerButtonStyle](avkit/avroutepickerview/routepickerbuttonstyle.md)
- [AVRoutePickerViewButtonStyle](avkit/avroutepickerviewbuttonstyle.md)
- [routePickerButtonColor(for:)](avkit/avroutepickerview/routepickerbuttoncolor(for:).md)
- [setRoutePickerButtonColor(_:for:)](avkit/avroutepickerview/setroutepickerbuttoncolor(_:for:).md)
- [AVRoutePickerView.ButtonState](avkit/avroutepickerview/buttonstate.md)

### Accessing the player

- [player](avkit/avroutepickerview/player.md)

### Setting a custom routing controller

- [customRoutingController](avkit/avroutepickerview/customroutingcontroller.md)

## Relationships

### Inherits From

- [NSView](appkit/nsview.md)
- [UIView](uikit/uiview.md)

### Conforms To

- [CALayerDelegate](quartzcore/calayerdelegate.md)
- [CLBodyIdentifiable](corelocation/clbodyidentifiable.md)
- [CMBodyIdentifiable](coremotion/cmbodyidentifiable.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSDraggingDestination](appkit/nsdraggingdestination.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIAccessibilityIdentification](uikit/uiaccessibilityidentification.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearance](uikit/uiappearance.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIDynamicItem](uikit/uidynamicitem.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UILargeContentViewerItem](uikit/uilargecontentvieweritem.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIPopoverPresentationControllerSourceItem](uikit/uipopoverpresentationcontrollersourceitem.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)
