Types of UIGestureRecognizer

Refrence

1. UITapGestureRecognizer :

This class regards the tap gestures made on a view. It can be used to handle single or multiple taps, either with one or more fingers. Tapping is one of the most usual gestures that users make.

2. UISwipeGestureRecognizer :

Another important gesture is the swipe, and this class exists just for it. Swiping happens when dragging a finger towards a direction (right, left, top and down). A characteristic example of the swipe gesture exists on the Photos app, where we use our fingers to slide from one photo to another.

3. UIPanGestureRecognizer :

The pan gesture is actually a drag gesture. It’s used when it’s needed to drag views from one point to another.

4. UIPinchGestureRecognizer :

When you view photos on the Photos app and you use your two fingers to zoom in or out to a photo, then you perform a pinch gesture. As you understand, pinching requires two fingers. An object of this class is usually handy to change the transform of a view, and more specifically its scale. Using pinch gestures for example, you can implement zoom in and out to photos on your own apps.

5. UIRotationGestureRecognizer :

In accordance to the previous gesture, rotation is used to rotate a view using two fingers.

6. UILongPressGestureRecognizer :

An object of that class monitors for long press gestures happening on a view. The pressing must last long enough in order to be detected, and the finger or fingers should not move a lot around the pressed point otherwise the gesture fails.

7. UIScreenEdgePanGestureRecognizer :

This one is similar to the swipe gesture, but with a great difference: The finger movement should always begin from an edge of the screen.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s