You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
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
MapKit parityFor feature parity with MapKit on iOS or macOSaccessibilityIntegration with screen readers and other assistive technologygood first issueGood for newcomersiOSMapbox Maps SDK for iOS
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.
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.
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.
MapKit parityFor feature parity with MapKit on iOS or macOSaccessibilityIntegration with screen readers and other assistive technologygood first issueGood for newcomersiOSMapbox Maps SDK for iOS
Activity
jmkiley commentedon Aug 28, 2017
We probably want to set
.accessibilityIgnoresInvertColorsseparately for theMGLMapViewand 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.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.
jmkiley commentedon Sep 13, 2017
Addressed in #9876