An alert that displays map- or navigation-related information to the user.
- iOS 12.0+
To display a navigation alert, create an instance of
CPNavigation and pass it to the map template’s
present method. When creating an alert, you must provide a title, action, and duration. The duration tells the system how long to show the alert before automatically dismissing it. You can also include a subtitle and secondary action when needed.
The system displays the primary and secondary actions as buttons on the alert. After the user taps the button, the system calls the action’s
handler block, which is where your app performs the requested action. The system also dismisses the alert after the user taps the button. However, your app can dismiss the alert without any user interaction by calling