@@ -29,15 +29,25 @@ class CustomBarsViewController: UIViewController {
2929 }
3030
3131 // For demonstration purposes, simulate locations if the Simulate Navigation option is on.
32- let navigationService = MapboxNavigationService ( routeResponse: response, routeIndex: 0 , routeOptions: routeOptions, simulating: simulationIsEnabled ? . always : . onPoorGPS)
32+ let navigationService = MapboxNavigationService ( routeResponse: response,
33+ routeIndex: 0 ,
34+ routeOptions: routeOptions,
35+ routingProvider: NavigationSettings . shared. directions,
36+ credentials: NavigationSettings . shared. directions. credentials,
37+ simulating: simulationIsEnabled ? . always : . onPoorGPS)
3338
3439 // Pass your custom implementations of `topBanner` and/or `bottomBanner` to `NavigationOptions`
3540 // If you do not specify them explicitly, `TopBannerViewController` and `BottomBannerViewController` will be used by default.
3641 // Those are `Open`, so you can also check thier source for more examples of using standard UI controls!
3742 let topBanner = CustomTopBarViewController ( )
3843 let bottomBanner = CustomBottomBarViewController ( )
39- let navigationOptions = NavigationOptions ( navigationService: navigationService, topBanner: topBanner, bottomBanner: bottomBanner)
40- let navigationViewController = NavigationViewController ( for: response, routeIndex: 0 , routeOptions: routeOptions, navigationOptions: navigationOptions)
44+ let navigationOptions = NavigationOptions ( navigationService: navigationService,
45+ topBanner: topBanner,
46+ bottomBanner: bottomBanner)
47+ let navigationViewController = NavigationViewController ( for: response,
48+ routeIndex: 0 ,
49+ routeOptions: routeOptions,
50+ navigationOptions: navigationOptions)
4151 bottomBanner. navigationViewController = navigationViewController
4252
4353 let parentSafeArea = navigationViewController. view. safeAreaLayoutGuide
0 commit comments