<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPInterfaceController/showOverlayTemplate(_:animated:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPInterfaceController(im)showOverlayTemplate:animated:completion:"
  },
  "title" : "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.

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

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

## 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.

---

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)