Gesture hud

Notes on GestureHUD. Great for debugging gestures in macOS


class TestView:NSView{
    lazy var gestureHUD:GestureHUD  =  GestureHUD(self)
        self.acceptsTouchEvents = true/*Enables gestures*/
        self.wantsRestingTouches = true/*Makes sure all touches are registered. Doesn't register when used in playground*/
extension TestView{
    override func touchesBegan(with event:NSEvent) {
    override func touchesMoved(with event:NSEvent) {
    override func touchesEnded(with event:NSEvent) {

Look for the code here: (The file is named GestureHUD.swift)

Update 2017-09-07 By popular demand: I wrote an XCode AppDelegate.swift “starter kit” to get you started:

If the above AppDelegate code doesn’t work out of the gate, check if you have gestures enabled in sys prefs. Restarting your computer or Restarting touch devices could also help