Alright, I'll just say that again:
I am animating the path value of a filled but not stroked CAShapeLayer and I would like to make it animate more smoothly. Here is the basic animation code:
CABasicAnimation * pathAnimation = [CABasicAnimation animationWithKeyPath:@"path"];
pathAnimation.toValue = (id)targetPath.CGPath;
pathAnimation.fromValue = (id)shapePath.CGPath;
//pathAnimation.fromValue = (id)((CAShapeLayer*)[currentShapeLayers objectForKey:key]).path;
pathAnimation.repeatCount = 0;
pathAnimation.duration = animationTime;
pathAnimation.autoreverses = NO;
[[currentShapeLayers objectForKey:key] addAnimation:pathAnimation forKey:@"animatePath"];
Eh, it works alright. But the paths are oddly shaped and dynamically formed. I tried ensuring that the number of points is always the same between paths, and that kind of helps. But I still get parts of the paths animating that I don't want to animate. Really what I'd like to do is keep part of the path static while the rest of the path grows out of one side or shrinks back into it or, in some cases, separates from the main path into a separate subpath.
I've considered finding intermediary path stages and animating to those first, and then finishing the animation from there, but I feel like there may be another solution.