Recipe: Adding a Simple Direct Manipulation Interface

Before moving on to more modern (and commonly used) gesture recognizers, take time to understand and explore the traditional method of responding to a user’s touch. You’ll gain a deeper understanding of the touch interface by learning how simple UIResponder touch event handling works.

When you work with direct manipulation, your design focus moves from the UIViewController to the UIView. The view, or more precisely the UIResponder, forms the heart of direct manipulation development. You create touch-based interfaces by customizing methods that derive from the UIResponder class.

Recipe 1-1 centers on touches in action. This example creates a child of UIImageView called DragView and adds touch ...

Get The Core iOS Developer’s Cookbook, Fifth Edition 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.