Re: Layer needs display if presentation layer moves?
Re: Layer needs display if presentation layer moves?
- Subject: Re: Layer needs display if presentation layer moves?
- From: Kyle Sluder <email@hidden>
- Date: Tue, 28 Jan 2014 17:26:32 -0800
On Tue, Jan 28, 2014, at 05:00 PM, Seth Willits wrote:
> I have several box-shaped layers and while any of them is moving
> (position or bounds is changing), I need this one other shared
> "connections" layer (which draws lines between certain boxes) to
> continuously redraw, so it's drawing the lines between the box layers'
> presentation layers so it animates nicely.
>
> So simply: Each time layer A's presentation layer moves, I need to redraw
> layer B.
>
> Ideas? I'm fumbling my way through one and it feels awkward.
The most straightforward way to do this is probably going to be creating
a custom CAAnimation that drives the position of the views which are
moving around, as well as a property of the "connections" layer that
encodes the positions between which lines should be drawn. The
connections layer can return YES for +needsDisplayForKey: for that "line
endpoints" key.
--Kyle Sluder
_______________________________________________
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