Summary

In this chapter, we explored how to respond to basic touch events. We also looked at how the subclasses of UIGestureResponder can be used to interpret those touch events as concise gestures such as pinches, long presses, rotations, and more. In the last section, we looked at two ways to use the accelerometer to control game actors. The first method allowed us to simply respond to a shake event. The second technique showed how we could get direct access to accelerometer data to control our application, laying the groundwork for motion-based gestures more complex than a simple shake.

Get Beginning iOS 5 Games Development: Using the iOS 5 SDK for iPad, iPhone, and iPod Touch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.