Is there a way to check if "increased contrast" is allowed in the accessibility settings in iOS?

In iOS 7.0.3, turning on the enhanced contrast mode removes the blur effects that you usually see in the navigation bar if you use a bar tint color with alpha less than 1.0, which makes the navigation bar much more transparent than with the default settings.

Is there a way to programmatically check if this option is enabled? While UIAccessibility has many other functions, such as UIAccessibilityIsInvertColorsEnabled (), I cannot find anything related to this parameter.

+6
source share
2 answers

There seems to be no open API to check if this option is enabled.

According to the UIKit Feature Reference , the only checks you can perform are the following

  • UIAccessibilityPostNotification
  • UIAccessibilityIsVoiceOverRunning
  • UIAccessibilityIsClosedCaptioningEnabled
  • UIAccessibilityRequestGuidedAccessSession
  • UIAccessibilityIsGuidedAccessEnabled
  • UIAccessibilityIsInvertColorsEnabled
  • UIAccessibilityIsMonoAudioEnabled
  • UIAccessibilityZoomFocusChanged
  • UIAccessibilityRegisterGestureConflictWithZoom
  • UIAccessibilityConvertFrameToScreenCoordinates
  • UIAccessibilityConvertPathToScreenCoordinates
+5
source

As in iOS 8, there is a way to check:

 UIKIT_EXTERN BOOL UIAccessibilityDarkerSystemColorsEnabled() NS_AVAILABLE_IOS(8_0); 
+4
source

Source: https://habr.com/ru/post/957150/


All Articles