Hi Rodolfo,

2010/6/1 Rodolfo Niborski <valr...@noos.fr>

>
> Neither I did figure out how to use David's code. I thought that overriding
> the implicit animation implies the use of layer actions. I can't see how
>
> [layer addAnimation:rotation forKey:@"transform"];
>
> can change the implicit animation.
>
According to the "Core Animation Programming Guide" certain properties of a
layer are connected to implicit animations, exerpt from the Core Animation
Programming Guide: "Changing the value of an animatable layer property
causes the layer to implicitly animate the change from the old value to the
new value.".
The default implied for the 'transform' property is a simple
CABAsicAnimation.
layer addAnimation:rotation forKey:@"transform" would change this implicit
animation to the 'rotation' one.

Besides, most of my attempts resulted in a EXC_BAD_ACCESS crash, and the
> rest were not successful.
>
Well my code doesn't show this symptom but as I've expressed as well I'm not
sure I on the right track.


>
> David, could you please be so kind and make your point a little more
> explicit ?
> Thank you again !
>
> @tino : when I set removedOnCompletion to NO for the first animation, the
> unwanted effect disappears, but the second animation gets occulted.
>
Ooops weird. I'll continue my attempts tonight. Hopefully David helps out
and fosters our understanding.
Core Animation really rocks (!) I just have to learn a lot better to make
even better use of it.

Regards,
Tino



>
> Rodolfo Niborski
> http://itunes.com/apps/yiddishforkids1-alefbeys
>
> Le 1 juin 2010 à 08:51, Tino Rachui a écrit :
>
> David, Rodolfo,
>
> I'm interested in this too so please excuse me for interfering. What is the
> root cause for Rodolfo's problem? He doesn't seem to set
> 'removedOnCompletion' to 'NO' (default is 'YES' according to docu) so I'm
> wondering if this could cause the unwanted effect (by the way I cannot see
> the bad effect when I try the example in the simulator though).
> David I'm sure I miss the point but how does your proposed solution solve
> the problem? I'd really like to better understand.
>
> Thanks,
> Tino
>
> P.S. David, are you using 'kCAValueFundtionRotateZ' intentionally or is
> this a typo, same for CATransform3DMakeRotation(...)?
>
>
> 2010/5/31 David Duncan <david.dun...@apple.com>
>
>> On May 31, 2010, at 2:24 PM, Rodolfo Niborski wrote:
>>
>> > My problem is that at the end of the first animation, the "Hello"
>> message shows up in its initial position for a fraction of a second.
>> > I've tried to set the fillMode of the first animation to
>> kCAFillModeForwards with no effect.
>>
>> What you want to do instead is set the transform of the layer rather than
>> trying to modify the animation to stick around. The code would be something
>> like this:
>>
>> CABasicAnimation *rotation = [CABasicAnimation animationWithKeyPath:@
>> "transform"];
>> rotation.valueFunction = [CAValueFunction functionWithName:
>> kCAValueFunctionRotateZ];
>> // setup the rest of the animation as you did previously
>> layer.transform = CATransform3DMakeRotation(M_PI, 0, 0, 1);
>> [layer addAnimation:rotation forKey:@"transform"];
>>
>> What this does is it creates a basic animation that does the rotation, and
>> then overrides the implicit animation that is created when you assign the
>> transform to the layer. In this example I use the CAValueFunction rather
>> than the extended keypath as this is more efficient and much more
>> predictable, but doing so requires 10.6.
>> --
>> David Duncan
>> Apple DTS Animation and Printing
>>
>> _______________________________________________
>>
>> 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/tino.rachui%40googlemail.com
>>
>> This email sent to tino.rac...@googlemail.com
>>
>
>
>
> --
> -Tino
>
>
>


-- 
-Tino
_______________________________________________

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