Closed incanus closed 12 years ago
This is an improvement on the #65 RMCircle patch from before.
RMCircle
The previous solution of swapping out the CAShapeLayer solves the problem of sizing up or down without clipping artifacts, but behaves weirdly when the map view is zoomed in or out.
CAShapeLayer
Before: http://dl.dropbox.com/u/575564/path_before.mov
This patch instead reverts the CAShapeLayer swap and instead explicitly adds an animation to changes to the path properly of it. Per the class docs:
path
Unlike most animatable properties, path (as with all CGPathRef animatable properties) does not support implicit animation.
CGPathRef
So this adds the animation if we exist inside of a CATransaction block with duration, matching its duration, for cases where we are animating zoom.
CATransaction
duration
After: http://dl.dropbox.com/u/575564/path_after.mov
This is an improvement on the #65
RMCircle
patch from before.The previous solution of swapping out the
CAShapeLayer
solves the problem of sizing up or down without clipping artifacts, but behaves weirdly when the map view is zoomed in or out.Before: http://dl.dropbox.com/u/575564/path_before.mov
This patch instead reverts the
CAShapeLayer
swap and instead explicitly adds an animation to changes to thepath
properly of it. Per the class docs:So this adds the animation if we exist inside of a
CATransaction
block withduration
, matching its duration, for cases where we are animating zoom.After: http://dl.dropbox.com/u/575564/path_after.mov