Chapter 4. Multi-Touch Events and Geometry

In Chapter 3, you were introduced to some of the iPhone's basic user interface elements. Many objects support high-level events to notify the application of certain actions taken by the user. These actions rely on lower-level mouse events provided by the UIView class and a base class underneath it: UIResponder. The UIResponder class provides methods to recognize and handle the mouse events that occur when the user taps or drags on the iPhone's screen. Higher-level objects, such as tables and action sheets, take these low-level events and wrap them into even higher-level ones to handle button clicks, swipes, row selections, and other types of behavior. Apple has provided a multi-touch API capable of intercepting finger gestures in order to make the same use of finger movements in your UI. The touches API tells the application exactly what has occurred on the screen and provides the information the application needs to interact with the user.