---
title: "dismissNavigationAlert(animated:completion:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cpmaptemplate/dismissnavigationalert(animated:completion:)"
---

# dismissNavigationAlert(animated:completion:)

Tells the map template to dismiss the visable navigation alert.

## Declaration

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

```swift
func dismissNavigationAlert(animated: Bool) async -> Bool
```

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

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: func dismissNavigationAlert(animated: Bool) async -> Bool For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Displaying a Navigation Alert

- [present(navigationAlert:animated:)](carplay/cpmaptemplate/present(navigationalert:animated:).md)
- [currentNavigationAlert](carplay/cpmaptemplate/currentnavigationalert.md)
- [CPNavigationAlert](carplay/cpnavigationalert.md)
