animation - Animate a line into a sine wave in iOS -


i'm new animation in ios , there seems lot of different ways accomplish same thing. i'm looking way animate flat line sine wave , back. best way accomplish this? how go adding ease out or bounce effect?

you can use combination of cashapelayer (with uibezierpaths specify line , sine wave line) , cabasicanimation achieve this:

cabasicanimation *animation = [cabasicanimation animationwithkeypath:@"path"]; animation.fromvalue = (id)linepath; animation.tovalue = (id)sinepath; [shapelayer addanimation:animation forkey:@"animatepath"]; 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -