Contents

CPNowPlayingButton

The abstract base class that Now Playing template buttons use.

Declaration

@MainActor class CPNowPlayingButton

Overview

CPNowPlayingButton is an abstract base class for defining buttons that the Now Playing template displays. It provides the common functionality that’s present in all buttons available to the template.

You don’t use this class directly, or create your own subclasses. Instead, you must use one of the concrete subclasses that the framework provides, such as CPNowPlayingImageButton or CPNowPlayingShuffleButton.

Topics

Creating a Button

Managing the Button State

Initializers

See Also

Managing the Template’s Buttons