January 2012
Beginner
655 pages
16h 35m
English
In this chapter, you have seen how to obtain the gyroscope and accelerometer data of your iOS device. You also saw how to use the Shake API to help you determine whether your device is being shaken. Combining this knowledge enables you to create very compelling applications (such as shaking the device to refresh the data displayed in a Table View).
EXERCISES
Answers to the exercises can be found in Appendix D.
WHAT YOU LEARNED IN THIS CHAPTER
| TOPIC | KEY CONCEPTS |
| Accessing the gyroscope and accelerometer data | Use the CMMotionManager class. |
| Detecting shakes | You can use either the accelerometer data or the Shake API in the iOS SDK. For the Shake API, handle the following events: motionBegan:, motionEnded:, and motionCancelled:. |