---
title: "tabBarTemplate(_:didSelect:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cptabbartemplatedelegate/tabbartemplate(_:didselect:)"
---

# tabBarTemplate(_:didSelect:)

Tells the delegate when the tab bar selects the specified template.

## Declaration

```swift
func tabBarTemplate(_ tabBarTemplate: CPTabBarTemplate, didSelect selectedTemplate: CPTemplate)
```

## Parameters

- `tabBarTemplate`: The tab bar template that alerts you to the change in selection.
- `selectedTemplate`: The template that the user selects.

## Discussion

Discussion The tab bar template calls this method each time the user selects a tab. tabBarTemplate is the same template that the tab bar’s selectedTemplate property returns.
