Hour 20. Sensing the World

The main difference between iPhones and standard computers is their portability and the number of sensors they come with, which creates a new user experience. In this hour, you’ll learn to use the accelerometer, which reports the angle at which your iPhone is tilted, Core Location, which tells you the location of your iPhone, and the camera, which lets you take pictures and short videos.

Using the iPhone’s Accelerometer

The iPhone was the first mass-market device to use accelerometers for user-interface interaction: switching between Landscape and Portrait modes. The iPhone ...

Get Sams Teach Yourself Cocoa Touch™ Programming in 24 Hours 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.