Skip to Content
Beginning iOS 5 Application Development
book

Beginning iOS 5 Application Development

by Wei-Meng Lee
January 2012
Beginner content levelBeginner
655 pages
16h 35m
English
Wrox
Content preview from Beginning iOS 5 Application Development

SUMMARY

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

  1. Name the class to use to obtain the gyroscope and accelerometer data on your iOS device.
  2. Name the three events in the Shake API in the iOS SDK.

Answers to the exercises can be found in Appendix D.

image 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:.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering iOS 12 Programming - Third Edition

Mastering iOS 12 Programming - Third Edition

Donny Wals
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9781118144251Purchase book