Skip to content

[Bug]: StyleManager.refreshAppearance(for:) can break unrelated views #4819

@isaac-weisberg

Description

@isaac-weisberg

Mapbox Navigation SDK version

3.12.1

Steps to reproduce

This behavior was originally introduced in #519 (comment)

  1. Create an app that doesn't immediately user MapBox screens
  2. Add an arbitrary UIView to UIWindow
  3. Create constraints between this view and the window
  4. Instantiate NavigationViewController
  5. Set NavigationViewController.showsSpeedLimits = false
  6. This is going to cause StyleManager.refreshAppearance(for:) call

Expected behavior

Arbitrary UIView is left untouched, still constrained to the UIWindow

Actual behavior

Any unrelated UIView that is direct child of the UIWindow gets removed, losing the constraints, and re-added back to the window.

Is this a one-time issue or a repeatable issue?

repeatable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions