Motion Effects

iOS devices have a lot of powerful components embedded within them. A few of these – the accelerometer, magnetometer, and gyroscope – help determine the orientation of the device. They are how the device knows, for example, whether to display in portrait or landscape orientation. Starting in iOS 7, Apple introduced a way for applications to easily take advantage of these sensors by adding built-in parallax.

When you drive down the road, the signs along the shoulder appear to move much more quickly than trees in the distance. Your brain interprets this difference in apparent speed as movement in space. This visual effect is called parallax. With iOS 7, you have probably noticed this on the home screen where the icons ...

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.