---
title: WKSwipeGestureRecognizer
framework: watchkit
role: symbol
role_heading: Class
path: watchkit/wkswipegesturerecognizer
---

# WKSwipeGestureRecognizer

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

## Declaration

```swift
class WKSwipeGestureRecognizer
```

## Overview

Overview A swipe is a discrete gesture; the associated action message is sent only once per gesture. You do not create instances of this class programmatically. Instead, add a swipe gesture recognizer to your Watch app’s storyboard file, dropping it onto a specific interface object. Touches occurring within the bounds of that interface object are tracked by the gesture recognizer and reported to an action method you define on the parent interface controller. For information on defining your action method and connecting it to your gesture recognizer, see WKGestureRecognizer. State Changes for a Swipe Gesture A swipe gesture recognizer tracks discrete events, and therefore has a limited number of state changes. The swipe gesture is recognized when a single touch has moved mostly in an allowable direction far enough to be considered 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.

The gesture recognizer calls its action method when it enters the WKGestureRecognizerState.recognized state. You may determine the location where a swipe began by calling its locationInObject() method. For more information on implementing discrete gesture recognizers, see WKGestureRecognizer. Interface Builder Attributes Xcode lets you configure information about your gesture recognizer in your storyboard file. The following table lists the attributes you can configure in your storyboard and their meaning.  |   |  The WKGestureRecognizer parent class also defines attributes that you can configure for your gesture recognizer. For information about those attributes, see WKGestureRecognizer.

## Topics

### Configuring the Gesture Recognizer

- [direction](watchkit/wkswipegesturerecognizer/direction.md)

### Constants

- [WKSwipeGestureRecognizerDirection](watchkit/wkswipegesturerecognizerdirection.md)

## Relationships

### Inherits From

- [WKGestureRecognizer](watchkit/wkgesturerecognizer.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)

## See Also

### Event handling

- [WKCrownSequencer](watchkit/wkcrownsequencer.md)
- [WKCrownDelegate](watchkit/wkcrowndelegate.md)
- [WKGestureRecognizer](watchkit/wkgesturerecognizer.md)
- [WKLongPressGestureRecognizer](watchkit/wklongpressgesturerecognizer.md)
- [WKPanGestureRecognizer](watchkit/wkpangesturerecognizer.md)
- [WKTapGestureRecognizer](watchkit/wktapgesturerecognizer.md)
