Contents

deltaX

The x-coordinate change for scroll wheel, mouse-move, mouse-drag, and swipe events.

Declaration

var deltaX: CGFloat { get }

Discussion

This property is only valid for scroll wheel, mouse-move, mouse-drag, and swipe events. For swipe events, a nonzero value represents a horizontal swipe; -1.0 corresponds to swipe right and 1.0 corresponds to swipe left.

For scroll wheel events, use scrollingDeltaX instead.

See Also

Getting scroll wheel and flick events