On Sep 10, 2009, at 7:20 PM, Christopher J Kemsley wrote:

CAShapeLayer with Path from PointA to PointB

In this method, I used a CAShapeLayer with the correct color and a 1px width. I made a path between the two points.

For moves, I created another path representing the new position and used a CABasicAnimation to animate the "path" property.

This also 'works,' but also has a side-effect: A line, instead of animating from (oldPointA,oldPointB) to (newPointA,newPointB) would animate to (oldPointA,oldPointB) to (randomPoint,randomPoint) to (newPointA,newPointB) (Note: (aPoint,bPoint) represents a line/path from aPoint to bPoint)

yes, that looks like a bug, please file a radar so we can track it. (bugreport.apple.com )

for now I think you can get the right result by giving each line three points instead of two, the easiest way to do that is just add an extra point with the same coordinates as the end point.

        John


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to