You know how in accessibility, the user can set the home button to triple-click and make that the "inverse color mode"? Is there a way for your app to detect if the phone is in the inverse color mode? Thanks.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yes, and it's simple. You can call
UIAccessibilityIsInvertColorsEnabled();
which return a BOOL
for whether or not inverted colors is currently on.
You can also observe
UIAccessibilityInvertColorsStatusDidChangeNotification
to get notified when the user turns on or off inverted colors.