Skip to content
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

Allow the route overview FloatingButton to be removed #2102

Open
matthewkertis opened this issue Apr 11, 2019 · 2 comments
Open

Allow the route overview FloatingButton to be removed #2102

matthewkertis opened this issue Apr 11, 2019 · 2 comments

Comments

@matthewkertis
Copy link
Contributor

matthewkertis commented Apr 11, 2019

We would like the ability to hide or remove the overview FloatingButton. We would also like to be able to programmatically call that action ourselves from a custom button we are adding to the bottom banner.

Mapbox Navigation SDK version:0.31.0

@frederoni
Copy link
Contributor

It's not the most ergonomic, but;

let bottomBanner = navigationViewController.view.findSubviewsRecursively(BottomBannerView.self).first!
let floatingButtons = navigationViewController.view.findSubviewsRecursively(FloatingButton.self)
let overviewButton = floatingButtons[0]
let muteButton = floatingButtons[1]
let feedbackButton = floatingButtons[2]

would give it access to the floating buttons.
From here you could add/remove your own targets for each button. It might not be entirely safe because we find the by index here, which is subject to change. 🤔

@matthewkertis
Copy link
Contributor Author

Yeah we considered that but we were hoping to get the buttons exposed because, as you say, they are subject to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants