1 Reply
      Latest reply on Dec 31, 2016 1:34 PM by dev0400
      dev0400 Level 2 Level 2 (25 points)

        Hey everyone,

        I need to be able to determine how long the user holds down a button on the watch. My initial idea was to listen to the on touch event, store the date, then compare it to when they let up. However, only touch up events are possible as far as I can tell.

        This is essential to improving my Morse Code app, any ideas on how I can make it happen?


        I'll update this post if I find a solution.


        Related question:




        • Re: WKInterfaceButton onTouchDown
          dev0400 Level 2 Level 2 (25 points)


          I found WKGestureRecognizer. I added two long press gesture recognizers to my WKInterfaceButton, one for short taps and one for long presses.


          Long press representing a tap:

               Min duration: 0 seconds

               Must fail first: other long press

          Long Press representing a long press:

               Min duration: 0.1 seconds


          I was unable to get the tap gesture recognizer to work, that's why I used to long press gestures. I imagine the button's own tap recognizer was conflicting.


          I will likely have to continue experimenting with these values. Hopefully this will help someone else stumped by WKInterfaceButton's lack of touch down events.