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

# dismissNavigationAlert(animated:completion:)

Tells the map template to dismiss the visable navigation alert.

```
func dismissNavigationAlert(animated: Bool, completion: @escaping (Bool) -> Void)
```

## Parameters

`animated`

Determines whether the system should animate the dismissal of the navigation alert. Set to <doc://com.apple.documentation/documentation/Swift/true> to animate the dismissal.

`completion`

The block invoked after dismissing the navigation alert. The <doc://com.apple.documentation/documentation/Swift/Bool> argument in the block indicates whether the template dismissed an alert.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> func dismissNavigationAlert(animated: Bool) async -> Bool
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

---

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)