> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/ios/navigation/v2/llms.txt)

# 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`.
    
    ![](https://docs.mapbox.com/ios/assets/ideal-img/navigation-overview-setup-ib.0d9261d.480.png)
-   Set up a segue to the storyboard reference like you would to any other `UIViewController`.
    
    ![](https://docs.mapbox.com/ios/assets/ideal-img/navigation-overview-setup-ib-segue.fb0486d.480.png)

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

-   [Example application](https://github.com/mapbox/mapbox-navigation-ios-examples/tree/main/Navigation-Examples/Examples/CustomSegue/)