---
title: CPNowPlayingRepeatButton
framework: carplay
role: symbol
role_heading: Class
path: carplay/cpnowplayingrepeatbutton
---

# CPNowPlayingRepeatButton

A button for cycling through the available repeat modes.

## Declaration

```swift
@MainActor class CPNowPlayingRepeatButton
```

## Overview

Overview CPNowPlayingRepeatButton is a concrete subclass of CPNowPlayingButton. Use the button’s handler to invoke your existing functionality for cycling through repeat modes, using the same MPChangeRepeatModeCommand that you provide to MPRemoteCommandCenter. CarPlay uses MPRemoteCommandCenter to observe changes to the repeat mode and updates the button’s appearance accordingly.

## Relationships

### Inherits From

- [CPNowPlayingButton](carplay/cpnowplayingbutton.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Managing the Template’s Buttons

- [nowPlayingButtons](carplay/cpnowplayingtemplate/nowplayingbuttons.md)
- [updateNowPlayingButtons(_:)](carplay/cpnowplayingtemplate/updatenowplayingbuttons(_:).md)
- [CPNowPlayingButton](carplay/cpnowplayingbutton.md)
- [CPNowPlayingImageButton](carplay/cpnowplayingimagebutton.md)
- [CPNowPlayingAddToLibraryButton](carplay/cpnowplayingaddtolibrarybutton.md)
- [CPNowPlayingMoreButton](carplay/cpnowplayingmorebutton.md)
- [CPNowPlayingPlaybackRateButton](carplay/cpnowplayingplaybackratebutton.md)
- [CPNowPlayingShuffleButton](carplay/cpnowplayingshufflebutton.md)
