Game Development Reference
In-Depth Information
Tap Gestures
Tap gestures are used throughout iOS . From launching an application to dropping a pin in the Maps
application, tap gestures are the backbone of the iOS interface. This makes sense because they are
very similar to mouse clicks on desktop operating systems. There are similarities between the tap
gesture and the mouse click; for example, launching an application from the system dock in OS X
is done with a single click, while launching an iOS application is done with a single tap. The analogy
continues if we consider the “secondary click” (also known as a control click or right click) on OS X;
this is similar to the two-finger tap in iOS . In fact, if you are using a Mac laptop, the touch pad can be
configured to treat a two-finger tap as a “secondary click.”
For this example, we are going to configure a bunch of UITapGestureRecognizers to respond to
different combinations of tap counts and the number of fingers involved (touches). Figure 8-2 shows
this example in action.
Figure 8-2. Power-ups activated by tap gestures
 
Search WWH ::




Custom Search