Apple introduced in iOS 7.0.3 a setting to reduce motion ( http://support.apple.com/kb/HT5595 ) : Settings -> General -> Accessibility -> Reduce Motion
Sadly there is no public API to know if the user enabled “Reduce motion”.
Want to support this blog? Please check out
Here is how to get the value of this setting using a private API. Note that you should not use this code for applications submitted to the App Store.- Easily preview Mermaid diagrams
- Live update when editing
- Capture screenshots
- Create PNG from the Terminal
- Free download on the Mac App Store
#include <dlfcn.h>
+ (BOOL) reduceMotionEnabled
{
BOOL (*_UIAccessibilityReduceMotionFunction)(void) = (BOOL (*)(void)) dlsym(RTLD_DEFAULT, "_UIAccessibilityReduceMotion");
if(_UIAccessibilityReduceMotionFunction != NULL)
{
return _UIAccessibilityReduceMotionFunction();
}
else
{
NSLog(@"Unsupported: _UIAccessibilityReduceMotion does not exist on this iOS version");
return NO;
}
}
Edit: Apple added a public API on iOS 8:
// Returns whether the system preference for reduce motion is enabled
UIKIT_EXTERN BOOL UIAccessibilityIsReduceMotionEnabled() NS_AVAILABLE_IOS(8_0);