I use CADisplayLink to create a view animation that simply interpolates the value and redraws the view.
eg. I have a MyView and it has a value property when the value is set. I call setNeedsDisplay and the view knows what to draw.
to bring this to life, I use CADisplayLink , and I want the morph representation between the values. I do this by simply interpolating the value from the start and stop of the animation. Value:
- (CGFloat)interpolatedValue:(CGFloat)sourceValue withValue:(CGFloat)targetValue forProgress:(CGFloat)progress;
Now getting a linear stroke is easy and getting a “concrete curve” (ok), but I want to be able to use the CAMediaTimingFunction for this (or some other existing logic), I don't want to reinvent the wheel again :)
ios core-animation uiview
Daij-djan
source share