1

Is there a way to implement a sliding button on the watch, similar to the power button linked below?

power off screen from watch

Nick M
  • 51
  • 1
  • 6

2 Answers2

0

You can create a custom button with the help of SpriteKit in WatchOS 3 or later. Add SKScene and give pan gesture or swipe gesture to it.

Parth Adroja
  • 13,198
  • 5
  • 37
  • 71
0

I ended up using SpriteKit to add an SKSpriteNode to the scene with my image. It doesn't have the smoothness of the power off slider, but that could probably be tweaked. Using an SKAction to move the icon instead of setting the coordinates directly helped but it's not perfect.

Nick M
  • 51
  • 1
  • 6
  • Do you have an example of this that people can see? We were planning on using a WKInterfaceGroup and overlapping elements while implementing a pan gesture. – T.Okahara Aug 30 '18 at 19:37
  • never mind I used groups and a pan gesture to make it myself. – T.Okahara Sep 13 '18 at 16:45