Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Smart Invert Colors inverts the map’s colors #9859

Closed

Description

@1ec5

The Smart Invert Colors feature in iOS 11 is designed to avoid inverting graphical content like images and videos. However, it does invert MGLMapView’s content, including the map, any annotation views, and the ornaments, because MGLMapView is just an ordinary UIView as far as UIKit is concerned.

We should set MGLMapView.accessibilityignoresinvertcolors to avoid this situation, since style designers rarely expect their styles to be color-inverted. If separate “light” and “dark” styles intended for a particular application, then the application can listen for the UIAccessibilityInvertColorsStatusDidChange notification and swap styles accordingly. (That would be worth an example.)

Should annotation views be color-inverted or should be they exempted along with the map? The developer may want annotation views to contrast well against the map, but on the other hand they may want them to match other UI in the application.

/cc @frederoni @mapbox/cartography-cats @jmkiley

Activity

  1. added
    accessibility
    iOS
    MapKit parity
    good first issue
    on Aug 25, 2017
  2. self-assigned this
    on Aug 25, 2017
  3. jmkiley commented on Aug 28, 2017

    @jmkiley
    Contributor

    We probably want to set .accessibilityIgnoresInvertColors separately for the MGLMapView and its subviews. This would allow the users to customize that behavior based on their use case. The default behavior can be for the map and its subviews to ignore smart invert.

    Map ignores smart invert

    I have run into an issue where the map view's colors are inverted when I screenshot it. Will look into a fix for this later.

    Edited to add: Filed a bug report upstream for the screenshot issue.

  4. jmkiley commented on Sep 13, 2017

    @jmkiley
    Contributor

    Addressed in #9876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

MapKit parityaccessibilitygood first issueiOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions