<!--
{
  "availability" : [
    "iOS: 12.0.0 - 14.0.0",
    "iPadOS: 12.0.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPInterfaceController/presentTemplate(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPInterfaceController(im)presentTemplate:animated:"
  },
  "title" : "presentTemplate(_:animated:)"
}
-->

# presentTemplate(_:animated:)

Presents a template modally.

```
func presentTemplate(_ templateToPresent: CPTemplate, animated: Bool)
```

## Parameters

`templateToPresent`

A template to display over currently displayed content on the CarPlay screen. The template must be one of the following types:

- [`CPActionSheetTemplate`](/documentation/CarPlay/CPActionSheetTemplate)
- [`CPAlertTemplate`](/documentation/CarPlay/CPAlertTemplate)
- [`CPVoiceControlTemplate`](/documentation/CarPlay/CPVoiceControlTemplate)

`animated`

A Boolean value that indicates whether the system animates the display of transitioning templates. Set to <doc://com.apple.documentation/documentation/Swift/true> to animate the transition.

## Discussion

You can present only one template at a time.

---

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)