The x-coordinate change for mouse-move, mouse-drag, and swipe events.
Language
- Swift
- Objective-C
SDK
- macOS 10.0+
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 for swipe right and 1 for swipe left.
For scroll wheel events, use scrolling instead.