O'Reilly logo

iOS 4 in Action: Developing iPhone and iPad Apps by Shannon Appelcline, Christopher Allen, Brandon Trebitowski, Jocelyn Harrington

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 10. Positioning: accelerometers, location, and the compass

 

This chapter covers
  • Sensing gravity
  • Gauging movement
  • Determining location and orientation
  • Using Core Location

 

When we first introduced the iPhone and iPad, we highlighted a number of their unique features. Among them were three components that allow the device to figure out precisely where it is in space: a trio of accelerometers or gyroscope, which gives it the ability to sense motion such as shaking or rotation; a locational device (using either GPS or faux GPS), which lets it figure out where in the world it is; and a compass to figure out which direction it’s facing.

Other than accessing some basic orientation information, we haven’t done much with these features. ...

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