How to create animation like water fall on wall and then spread out drops on wall?
I need to create animation that images of water come out from bottom of view and then at middle of view at fall like water fall on wall or on ground and drops spread out here and there using core animation.
I tried to use transformation &开发者_如何学JAVAamp; scaling with CABasicAnimation but failed to create that type of animation.
how to do that ?
You need a path so your images can move along it.
Here is a good example to start with: http://watchingapple.com/2008/04/core-animation-paths/ (Moving the spinning wheel along an arbitrary path)
Above link is for mac os X but you should be able to copy and paste the part that uses CGPathRef ;)
Hope this helps
EDIT: Look this Apple's document, I think that is really what you need to know (take a look at the video first): http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Animation_Types_Timing/Articles/PropertyAnimations.html
Here is another example of how to do animations using CGPaths: CGPath Animation
And regarding the second animation, I think you also need a CAAnimationGroup which is no more than what its name suggest. You create some animations, put them in a array and set it into a CAAnimationGroup object. Here is an example:
http://www.cimgf.com/2009/02/03/record-your-core-animation-animation/
I didn't write any code because you didn't provide any code you tried, nor any clue of how is your curve, timing info, etc.
;)
精彩评论