问题
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