Users interact with the iPhone through a touch screen. No physical keyboard or mouse is available. The fingers serve as both the pointer and the input device. When the user touches the screen, a single event is launched. Safari Mobile defines different types of events, which capture and respond to the movements and touches of the user. We can respond to a one-finger or multi-touch finger event because the iPhone is a multi-touch device. In this recipe, we find out how to detect when the user is using one finger to interact with the device.
We are going to use the iWebKit framework for building a simple user interface to detect the events.