• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CAShapeLayer for Drawing Lines; Animations Skewed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CAShapeLayer for Drawing Lines; Animations Skewed


  • Subject: Re: CAShapeLayer for Drawing Lines; Animations Skewed
  • From: John Harper <email@hidden>
  • Date: Thu, 10 Sep 2009 21:31:00 -0700


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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >CAShapeLayer for Drawing Lines; Animations Skewed (From: Christopher J Kemsley <email@hidden>)

  • Prev by Date: Re: XC & IB 3.2 overlapping siblings
  • Next by Date: iTunes/iPhoto like Database using CoreData?
  • Previous by thread: CAShapeLayer for Drawing Lines; Animations Skewed
  • Next by thread: iTunes/iPhoto like Database using CoreData?
  • Index(es):
    • Date
    • Thread