<!--
{
  "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/pop(to:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPInterfaceController(im)popToTemplate:animated:"
  },
  "title" : "pop(to:animated:)"
}
-->

# pop(to:animated:)

Pops templates until the specified template is at the top of the navigation stack.

```
func pop(to targetTemplate: CPTemplate, animated: Bool)
```

## Parameters

`targetTemplate`

The template that you want at the top of the stack. The template must be on the navigation stack before you call this method.

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

---

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)