How to implement WatchKit sliding button?

287 Views Asked by At

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

power off screen from watch

2

There are 2 best solutions below

2
On BEST ANSWER

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.

0
On

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.