Handling Touch Interactions and Events
WHAT YOU WILL LEARN IN THIS CHAPTER:
- How to respond to basic touch events
- How to respond to orientation event changes
- How to customize key events
With its touch interface, iPhone and iPad devices are all about direct interactivity with the user. As a result, it is not surprising that any IOS web app you create can handle the variety of gestures — finger taps, flicks, swipes, and pinches — that a user naturally performs as they interact with your app on their mobile device.
THREE TYPES OF TOUCH EVENTS
There are three primary types of touch-related events to consider when developing an IOS web app:
- Mouse emulation events: Events in which a one- or two-finger action simulates a mouse.
- Touch events: Events that dispatch when one or more fingers touch the screen. You can trap touch events and work with multiple finger touches that occur at different points on the screen at the same time.
- Gesture events: Gesture events are combinations of touch events that also support scaling and rotation ...