<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPBarButtonProviding",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(pl)CPBarButtonProviding"
  },
  "title" : "CPBarButtonProviding"
}
-->

# CPBarButtonProviding

The methods that templates use to provide buttons for the navigation bar.

```
protocol CPBarButtonProviding : NSObjectProtocol
```

## Overview

`CPBarButtonProviding` is a protocol that templates use to provide a Back button and leading and trailing buttons for the navigation bar.

You don’t adopt this protocol in your own types. If you want to add buttons to the navigation bar, you must use one of the prebuilt templates that already conforms to the protocol, such as [`CPMapTemplate`](/documentation/CarPlay/CPMapTemplate) or [`CPContactTemplate`](/documentation/CarPlay/CPContactTemplate).

> Note:
> The root templates of a tab bar don’t show leading or trailing bar buttons, and the system throws an exception if you attempt to assign bar buttons to the Now Playing template.

## Topics

### Providing Navigation Bar Buttons

[`backButton`](/documentation/CarPlay/CPBarButtonProviding/backButton)

A button to display as the Back button on the navigation bar.

[`leadingNavigationBarButtons`](/documentation/CarPlay/CPBarButtonProviding/leadingNavigationBarButtons)

An array of bar buttons to display on the leading side of the navigation bar.

[`trailingNavigationBarButtons`](/documentation/CarPlay/CPBarButtonProviding/trailingNavigationBarButtons)

An array of bar buttons to display on the trailing side of the navigation bar.

[`CPBarButton`](/documentation/CarPlay/CPBarButton)

A button for placement in a navigation bar.

[`CPMessageComposeBarButton`](/documentation/CarPlay/CPMessageComposeBarButton)

A button that activates Siri and initiates the compose message flow.

## Relationships

### Conforming Types

[`CPMapTemplate`](/documentation/CarPlay/CPMapTemplate)

[`CPPointOfInterestTemplate`](/documentation/CarPlay/CPPointOfInterestTemplate)

[`CPGridTemplate`](/documentation/CarPlay/CPGridTemplate)

[`CPContactTemplate`](/documentation/CarPlay/CPContactTemplate)

[`CPListTemplate`](/documentation/CarPlay/CPListTemplate)

[`CPVoiceControlTemplate`](/documentation/CarPlay/CPVoiceControlTemplate)

[`CPInformationTemplate`](/documentation/CarPlay/CPInformationTemplate)

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)