Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

On iOS 7.0.3 turning on increased contrast mode removes the blur effects you'd normally see in the nav bar if you're using a bar tint color with an alpha less than 1.0, which makes the nav bar seem much more transparent than it is with the default settings.

Is there a way to programmatically check to see if this setting is enabled? While UIAccessibility has a ton of other functions like UIAccessibilityIsInvertColorsEnabled(), I can't find anything related to this setting specifically.

like image 887
Cam Saul Avatar asked Oct 31 '13 22:10

Cam Saul


People also ask

Should I turn on increase contrast Iphone?

Enabling 'Increase Contrast' can improve the contrast of text on certain backgrounds to make text more legible. This feature can be used in combination with other accessibility settings such as 'Bold Text', 'Colour Filters' and 'Invert Colours'.

How do you fix the contrast color on Accessibility?

Simply change the color of your text, or the color of your background. You can also increase the contrast by increasing the size of your text itself. Tip: If your text is over an image, add a solid color background to increase the contrast between your text and your background.


1 Answers

As of iOS 8 there is a way to check:

UIKIT_EXTERN BOOL UIAccessibilityDarkerSystemColorsEnabled() NS_AVAILABLE_IOS(8_0);

as of modern iOS:

UIAccessibility.isDarkerSystemColorsEnabled

like image 122
dave Avatar answered Oct 22 '22 18:10

dave