Creating iPhone web applications, by default, involves touch interaction. This is obvious, and luckily Apple has done a great job getting us up and going quickly by mapping clicks to touch events by default. However, what if we wanted a slideshow that reacted to a swipe from the user? Or, what if we wanted to zoom into a photo, without affecting the layout of a page, when the user pinched within a defined area of our application? Well, that's all up to us as developers.
In this chapter we'll go over touch events and gestures, and use the technology to build a slideshow that is responsive to a user's touch and gestures. Most of the concepts here will be basic to help you understand these new events that were not common in traditional web development. However, we'll also dive into some more advanced features using the pinch gesture to zoom in and out of an image. But, first we need to do some adjusting to our app by reorganizing our navigation, so that it does...