A button in a navigation bar.


class CPBarButton : NSObject


Creating a CarPlay Bar Button

init(type: CPBarButton.`Type`, handler: ((CPBarButton) -> Void)?)

Creates a bar button with a type and handler.

enum CPBarButton.Type

Types of bar buttons.

Configuring the Button

var isEnabled: Bool

A Boolean value that enables and disables the bar button.

var image: UIImage?

The image displayed on the bar button.

var title: String?

The title displayed on the bar button.

Getting the Button Style

var buttonType: CPBarButton.`Type`

The display type for the bar button.


Inherits From

See Also

Navigation Bar

protocol CPBarButtonProviding

A protocol indicating that an object provides navigation bar buttons.