Watchkit animation implementations: clock face, animated charts, circular progress bar

陌路散爱 提交于 2019-12-07 13:24:41

问题


I've seen some very basic demos of potential watchkit apps, and some appear to implement animations. Examples might be:

  • A clock face with a moving second hand or even minute hand.
  • A bar chart with bars that animate in, or who shape changes with new real-time data.
  • A circular progress bar who's bar animates from zero to the current value.

The only way I've seen so far to do animations is by a sequence of images over a duration:

[imageView startAnimatingWithImagesInRange:NSMakeRange(0, 60) duration:1.0 repeatCount:0];

How would these previous animation examples generally be implemented? I can't imagine they are all done with image sequences. I don't think one can even layer images, and coordinating placement would be a nightmare.


回答1:


They are all done with sequences of images. Here is some code for how I animate movement on a map. Is it possible to position views on top of each other

Edit

You may also find these frameworks helpful. https://github.com/frosty/Flipbook https://github.com/radianttap/WatchRingGenerator

2nd Edit

Here is another great article on adding animation into your Watch App. http://david-smith.org/blog/2015/03/04/ailw-adding-bits-of-liveliness/



来源:https://stackoverflow.com/questions/28859817/watchkit-animation-implementations-clock-face-animated-charts-circular-progre

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!