Swipe Gesture

The swipe gesture is probably most recognizable as the gesture used to switch the set of apps you see on the home screen. This gesture is often used to switch context, like with the home screen. Other examples include the four-finger swipe used to switch the foreground application on the iPad 2. It is sort of like pawing your way through your running applications. In our example, we are going to use swipe gestures to add comets to the scene, as shown in Figure 8–7.

In Figure 8–7, we see several comets on the screen. Each comet is created by a swipe gesture that determines where the comet starts and in which direction it travels. For example, a swipe to the right causes a comet to be created on the left and travel to the right. Let’s ...

Get Beginning iOS 5 Games Development: Using the iOS 5 SDK for iPad, iPhone, and iPod Touch now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.