O'Reilly logo

Learn iOS 8 App Development, Second Edition by James Bucanek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter    16

Apps with Attitude

In a feat of miniaturization that would make Wayne Szalinski1 proud, most iOS devices are equipped with an array of sensors that detect acceleration, rotation, and magnetic orientation—which is a lot of “ations.” The combined output of these sensors, along with a little math, will tell your app with surprising accuracy the attitude the device is being held in, whether it’s being moved or rotated (and how fast), the direction of gravity, and the direction of magnetic north. You can incorporate this into your app to give it an uncanny sense of immediacy. You can present information based on the direction the user is holding their device, control games through physical gestures, tell them whether the picture they’re ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required