Contents

dismissTemplate(animated:completion:)

Dismisses a modal template.

Declaration

func dismissTemplate(animated: Bool, completion: ((Bool, (any Error)?) -> Void)? = nil)
func dismissTemplate(animated: Bool) async throws -> Bool

Parameters

  • animated:

    If True, CarPlay animates the dismissal of the template.

  • completion:

    The closure CarPlay calls after it dismisses the template.

Discussion

CarPlay calls completion after it dismisses the template. The Boolean parameter is true when the dismissal succeeds; otherwise, it’s false and CarPlay provides an error that describes the failure. CarPlay throws an exception if the dismissal fails and you don’t provide a closure.

See Also

Displaying Templates Modally