Storyboards
On this page
To set up Mapbox Navigation in a storyboard:
-
Open the object library and drag in a
Storyboard Reference. -
Pick
Navigationfrom the Storyboard dropdown. -
Set Bundle to
MapboxNavigation-MapboxNavigation-resourcesif you are using Swift Package Manager ororg.cocoapods.MapboxNavigationif 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?