Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 17: Whee! Gyro and Accelerometer!

Chapter 17

Whee! Gyro and Accelerometer!

One of the coolest features of the iPhone, iPad, and iPod touch is the built-in accelerometer—the tiny device that lets iOS know how the device is being held and if it's being moved. iOS uses the accelerometer to handle autorotation, and many games use it as a control mechanism. It can also be used to detect shakes and other sudden movement. This capability is extended even further with iPhone 4, which also includes a built-in gyroscope that lets you determine the angle at which the device is positioned around each axis. In this chapter, we're going to introduce you to the use of the Core Motion framework to access these values in your application.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial