mapbox / mapbox/mapbox-navigation-ios

Floating buttons can be changed only after `NavigationViewController` is presented

Open
#3,421 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.