---
title: "showOverlayTemplate(_:animated:completion:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpinterfacecontroller/showoverlaytemplate(_:animated:completion:)"
---

# showOverlayTemplate(_:animated:completion:)

Show a template as an overlay over the current template hierarchy. Only one overlay template may be shown at a time.

## Declaration

```swift
func showOverlayTemplate(_ templateToShow: CPTemplate, animated: Bool, completion: ((Bool, (any Error)?) -> Void)? = nil)
```

```swift
func showOverlayTemplate(_ templateToShow: CPTemplate, animated: Bool) async throws -> Bool
```

## Discussion

Discussion note: Supported template types: @c CPVoiceControlTemplate The completion block will be called after the template has been shown. If the template was shown successfully, the boolean parameter will be YES. Otherwise, the boolean parameter will be NO and an @c NSError will be provided describing the failure. note: If the template is not successfully shown AND no completion block is specified, an exception will be thrown.
