Abstract
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. The accelerometer can also be used to detect shakes and other sudden movement. This capability was extended even further with the introduction of the iPhone 4, which was the first iPhone to include a built-in gyroscope to let developers determine the angle at which the device is positioned around each axis. The gyro and accelerometer are now standard fare on all new iPads and iPod touches. In this chapter, we’re going to introduce you to the use of the Core Motion framework to access the gyro and accelerometer values in your application.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 David Mark, Kim Topley, Jack Nutting, Frederik Olsson, and Jeff LaMarche
About this chapter
Cite this chapter
Mark, D., Topley, K., Nutting, J., Olsson, F., LaMarche, J. (2015). Whee! Gyro and Accelerometer!. In: Beginning iPhone Development with Swift 2. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1754-2_20
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1754-2_20
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1753-5
Online ISBN: 978-1-4842-1754-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)