Skip to main content

Storyboards

To set up Mapbox Navigation in a storyboard:

  • Open the object library and drag in a Storyboard Reference.

  • Pick Navigation from the Storyboard dropdown.

  • Set Bundle to MapboxNavigation-MapboxNavigation-resources if you are using Swift Package Manager or org.cocoapods.MapboxNavigation if you are using CocoaPods.

  • Set Reference ID to NavigationViewController.

  • Set up a segue to the storyboard reference like you would to any other UIViewController.

You also need to pass a indexedRouteResponse and optionally a navigationOptions to the NavigationViewController via prepareViewLoading(indexedRouteResponse:navigationOptions:) method. To do that, override your UIViewController's prepare(for:sender:).

Further resources

Was this page helpful?