---
title: "templateWillDisappear(_:animated:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpinterfacecontrollerdelegate/templatewilldisappear(_:animated:)"
---

# templateWillDisappear(_:animated:)

Tells the delegate that the template will disappear from the screen.

## Declaration

```swift
optional func templateWillDisappear(_ aTemplate: CPTemplate, animated: Bool)
```

## Parameters

- `animated`: A Boolean value indicating whether the system animates the disappearance of the template.

## See Also

### Handling Display Events

- [templateWillAppear(_:animated:)](carplay/cpinterfacecontrollerdelegate/templatewillappear(_:animated:).md)
- [templateDidAppear(_:animated:)](carplay/cpinterfacecontrollerdelegate/templatedidappear(_:animated:).md)
- [templateDidDisappear(_:animated:)](carplay/cpinterfacecontrollerdelegate/templatediddisappear(_:animated:).md)
