NEW: Master Swift design patterns with my latest book! >>

How to check whether users have enabled the reduced motion setting

Written by Paul Hudson    @twostraws

There’s a lot of animation in UIKit, and many users find it either distracting or hard to follow. As a result, iOS has a Reduce Motion accessibility setting that disables many animation and parallax effects, and simplifies most others – at least in their own apps.

If you want to follow suit – and you should – all you need to do is call UIAccessibilityIsReduceMotionEnabled(). This returns a boolean telling you whether the setting is active or not, so if it’s true you should take steps to animate differently or perhaps not at all.

Available from iOS 8.0

Did this solution work for you? Please pass it on!

Other people are reading…

About the Swift Knowledge Base

This is part of the Swift Knowledge Base, a free, searchable collection of solutions for common iOS questions.

Learn Server-Side Swift now!

Take your Swift code to the server and become a full-stack developer with my latest book: Server-Side Swift!

Click here to visit the Hacking with Swift store >>