Re: Moving CALayer and content transition animation
Re: Moving CALayer and content transition animation
- Subject: Re: Moving CALayer and content transition animation
- From: Conrad Shultz <email@hidden>
- Date: Thu, 07 Jun 2012 13:28:59 -0700
On 6/7/12 1:12 PM, Markus Spoettl wrote:
> On 6/7/12 9:39 PM, Conrad Shultz wrote:
>>> Is this to be expected? If so, what is the proper way of handling this?
>>> Surely there must be something basic I'm missing again.
>>>
>>> Thanks for any pointers!
>>
>> I haven't had a chance to test it myself, but what if you set the
>> transition animation on the layer's -presentationLayer instead of on the
>> layer directly?
>
> Isn't -presentationLayer is read-only? Even if it weren't, I'm not sure
> how that would work. The layer re-positioning is done in a non-animated
> fashion (within CATransation -begin, -disableActions:YES, -commit) and
> can happen a couple of times during the content animation. It's
> basically a layer that's dragged along with the mouse cursor.
-presentationLayer is generated by Core Animation but you can
-addAnimation: to it seemingly without ill effect; I was once told that
this is an approach akin to using the
UIViewAnimationOptionBeginFromCurrentState on iOS, but as I said this is
somewhat speculative and from second-hand experience.
In any event, it sounds like I misunderstood your problem. I thought
the layer was moving because you had added an animation to it, which
made me think the problem might be the divergence between the layer and
its presentationLayer. This doesn't sound like what you are actually
doing, so my idea (valid or not) doesn't really apply here anyway.
--
Conrad Shultz
Synthetiq Solutions
www.synthetiqsolutions.com
_______________________________________________
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