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 uibezierpath
s 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
Post a Comment