How do we use Watchkit Touch Events?

3.8k views Asked by At

I wanna use touch events in my app. I know gesture recognisers can not be used in watchKit. Is it possible to use functions like touchesBegan, touchesMove etc ?

3

There are 3 answers

0
brindy On BEST ANSWER

A little late to the party, but it's possible to use SceneKit with WatchKit and SceneKit allows you to add gesture handlers. Please see the Apple example project here:

https://developer.apple.com/library/content/samplecode/WatchPuzzle/Introduction/Intro.html#//apple_ref/doc/uid/TP40017284-Intro-DontLinkElementID_2

Edit: Looks like Tap, Swipe, Long Press and Pan gesture handles can be added to any view added to the InterfaceController.

0
GoodSp33d On

Apple Watch app uses WatchKit framework. UIKit events are not applicable here.

Alternate is to use forced touch event which triggers Context Menu (if available)

Instead of just tapping items on the screen, pressing the screen with a small amount of force activates the context menu (if any) associated with the current interface controller.

0
Jacky Li On

There is no such an api like "touchesBegan" or "touchesMove".

The only thing you can do to respond to a button event is to use IBAction.