mapbox / mapbox/mapbox-navigation-ios
Floating buttons can be changed only after `NavigationViewController` is presented
Open
Nobody has claimed this yet.
bug
jira-sync-complete
- Dominant language
- Swift
- Stars
- 918
- Forks
- 326
- Avg merge
- 1h 16m
- Merged PRs (30d)
- 3
Description
Consider this code:
let navigationViewController = NavigationViewController(for: response, routeIndex: 0, routeOptions: routeOptions, navigationOptions: navigationOptions)
navigationViewController.floatingButtons = []
This code won't work because ornamentsController inside of NavigationViewController will be created only in viewDidLoad.
We can trigger view load in floatingButtons getter to fix the problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at NavigationViewController, focusing on the floatingButtons getter and the ornamentsController initialization in viewDidLoad. Confirm the lifecycle behavior, then verify that assigning floatingButtons before presentation takes effect and that existing post-presentation behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100