iOS Developer Library

Developer

UIKit Framework Reference UISwipeGestureRecognizer Class Reference

Options
Deployment Target:

On This Page
Language:

UISwipeGestureRecognizer

UISwipeGestureRecognizer is a concrete subclass of UIGestureRecognizer that looks for swiping gestures in one or more directions. A swipe is a discrete gesture, and thus the associated action message is sent only once per gesture. More...

Inheritance


Conforms To


Import Statement


import UIKit @import UIKit;

Availability


Available in iOS 3.2 and later.

Data Types

  • The direction of the swipe.

    Declaration

    Swift

    struct UISwipeGestureRecognizerDirection : RawOptionSetType { init(_ rawValue: UInt) init(rawValue rawValue: UInt) static var Right: UISwipeGestureRecognizerDirection { get } static var Left: UISwipeGestureRecognizerDirection { get } static var Up: UISwipeGestureRecognizerDirection { get } static var Down: UISwipeGestureRecognizerDirection { get } }

    Objective-C

    typedef enum { UISwipeGestureRecognizerDirectionRight = 1 << 0, UISwipeGestureRecognizerDirectionLeft = 1 << 1, UISwipeGestureRecognizerDirectionUp = 1 << 2, UISwipeGestureRecognizerDirectionDown = 1 << 3 } UISwipeGestureRecognizerDirection;

    Constants

    • Right

      UISwipeGestureRecognizerDirectionRight

      The touch or touches swipe to the right. This direction is the default.

      Available in iOS 3.2 and later.

    • Left

      UISwipeGestureRecognizerDirectionLeft

      The touch or touches swipe to the left.

      Available in iOS 3.2 and later.

    • Up

      UISwipeGestureRecognizerDirectionUp

      The touch or touches swipe upward.

      Available in iOS 3.2 and later.

    • Down

      UISwipeGestureRecognizerDirectionDown

      The touch or touches swipe downward.

      Available in iOS 3.2 and later.

    Import Statement

    import UIKit

    Availability

    Available in iOS 3.2 and later.