Jaimish
Jaimish

Reputation: 629

Watchkit Animation

I am making the Watchkit app in that image is moving circular,Is it possible to animate WKInterfaceImage in circular path.

I have searched around but can't find anything to moving image in circular path in Watchkit, because it has a layout on stack bases and also can not set frame of the WKInterfaceImage.

If it is possible to do like above please help me out.

Upvotes: 2

Views: 741

Answers (1)

Cobra
Cobra

Reputation: 369

WatchKit does not support direct animation of an image like you would like. You have a couple options to achieve the same effect though. The best is most likely pre-rendering the circle and using the rotation through the images to give your desired animation. This is the only way to do frame-by-frame image updates on WatchKit OS2.

OS2 also supports animation of the basic layout properties, but this just allows you to change things like alignment or tint of an object. It would be unlikely to give a smooth circular motion with this method.

There is some detail available in the WWDC session on layout and animation here https://developer.apple.com/videos/play/wwdc2015-216/

And an animation article here http://code.tutsplus.com/tutorials/watchos-2-the-power-of-animations--cms-24302

Upvotes: 4

Related Questions