-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use MapboxNavigation within a UIView (instead of UIViewController)? #1814
Comments
Yes. There are a couple of options. 1: Simple: Use NavigationViewController’s view in an arbitrary view controller. 2: Intermediate: Use the |
Thank you for the fast answer. I don't know if I've understood you quite right, because I'm not really deep into Xcode. In the following code you can see the UIView I want to attach the Turn-by-turn window to. In the
Unfortunately, when I do this, Xcode prints the following error: I tried removing the line
Do you have any idea, what's going on here? I'm sorry if my code is complete bullshit... |
looks correct so far but you also need to add the view addSubview(navigationController.view) |
Thank you! Nevertheless, there's still the above mentioned error ( |
your |
I've now put the critical lines of code into another function:
But I'm still getting the same error. |
Maybe this error results out of my hacky solution for this issue: mapbox/mapbox-events-ios#85. There I had several problems too install MapboxNavigation via CocoaPods. After the installation I always got the following error in Xcode: To solve this issue I commented out the line of code that created the error ( |
@frederoni Do you have any idea to solve my error ( |
Hi!
For some reason I want to use MapboxNavigation within a UIView, because I have no access to its UIViewController. Is it possible to use the Turn-by-turn navigation within such a UIView?
In all your examples the map is used within a UIViewController, e.g.:
The text was updated successfully, but these errors were encountered: