---
title: UISwipeGestureRecognizer
framework: uikit
role: symbol
role_heading: Class
path: uikit/uiswipegesturerecognizer
---

# UISwipeGestureRecognizer

A discrete gesture recognizer that interprets swiping gestures in one or more directions.

## Declaration

```swift
@MainActor class UISwipeGestureRecognizer
```

## Mentioned in

Handling swipe gestures

## Overview

Overview UISwipeGestureRecognizer is a concrete subclass of UIGestureRecognizer.  UISwipeGestureRecognizer recognizes a swipe when the user moves the specified number of touches (numberOfTouchesRequired) in an allowable direction (direction) far enough to create a swipe. Swipes can be slow or fast. A slow swipe requires high directional precision but a small distance; a fast swipe requires low directional precision but a large distance. Because a swipe is a discrete gesture, the system sends the associated action message just once per gesture. You can determine the location where a swipe begins by calling the UIGestureRecognizer methods location(in:) and location(ofTouch:in:). The former method provides the centroid if the gesture contains more than one touch; the latter provides the location of a particular touch.

## Topics

### Configuring the gesture

- [direction](uikit/uiswipegesturerecognizer/direction-swift.property.md)
- [numberOfTouchesRequired](uikit/uiswipegesturerecognizer/numberoftouchesrequired.md)
- [UISwipeGestureRecognizer.Direction](uikit/uiswipegesturerecognizer/direction-swift.struct.md)

## Relationships

### Inherits From

- [UIGestureRecognizer](uikit/uigesturerecognizer.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Standard gestures

- [Handling UIKit gestures](uikit/handling-uikit-gestures.md)
- [Coordinating multiple gesture recognizers](uikit/coordinating-multiple-gesture-recognizers.md)
- [Adopting hover support for Apple Pencil](uikit/adopting-hover-support-for-apple-pencil.md)
- [Supporting gesture interaction in your apps](uikit/supporting-gesture-interaction-in-your-apps.md)
- [UIHoverGestureRecognizer](uikit/uihovergesturerecognizer.md)
- [UILongPressGestureRecognizer](uikit/uilongpressgesturerecognizer.md)
- [UIPanGestureRecognizer](uikit/uipangesturerecognizer.md)
- [UIPinchGestureRecognizer](uikit/uipinchgesturerecognizer.md)
- [UIRotationGestureRecognizer](uikit/uirotationgesturerecognizer.md)
- [UIScreenEdgePanGestureRecognizer](uikit/uiscreenedgepangesturerecognizer.md)
- [UITapGestureRecognizer](uikit/uitapgesturerecognizer.md)
