Re: What is the default time for a CALayer transform?
Re: What is the default time for a CALayer transform?
- Subject: Re: What is the default time for a CALayer transform?
- From: Dimitri Bouniol <email@hidden>
- Date: Tue, 16 Dec 2008 05:37:55 -0800
The Core Animation Programing Guide — http://developer.apple.com/documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/AnimProps.html
#//apple_ref/doc/uid/TP40005942-SW2 — indicates 0.25 seconds are used
for an implicit animation.
As for using CABasicAnimation so you could use the delegate calls, set
the property (or key path) to the final value before adding the
animation to the layer, and you should get more appropriate results as
the animation ends. Additionally, you might need to wrap the property
call in a CATransaction to disable actions, but I don't know if it's
absolutely necessary.
On Dec 16, 2008, at 1:49 AM, Gustavo Pizano wrote:
Hello
Im rotating a layer, with the following method :
[nLayer setValue:value forKeyPath:@"transform.rotation.z"];
but then I want right after the animation ends, to check the new
position of the CALayer to align it into the closest grid cell
which will belong. I found out I can use the following method to
try to sync the animation ending time to what I want to do:
[self performSelector:@selector(printSomethinng) withObject:nil
afterDelay:0.5];
of course the selector here is something I tried, and the delay I
started at 1.0 and started to lower it till I get ( at eyes sight )
that once the animation finishes I get a message in the console.
I have been reading but I dunno what's the default time for an
animation into a CALayer when you use @"transform.rotation.z" or
just the transfom property., so I can set the delay exactly at time.
Thanks
Gustavo.
PD I was trying with a CAAnimation and the aplying it to the
CALayer, so I could use the method -(void)animationDidStop:
finished: , but when the animation ended it returned to the initial
state, kinda derotated the CALayer, which I don't want such a
behavior, I was told to set the autpreverse option to NO, and add a
group, this last thing I couldn't achieve it. didn't know how to do
it.
--
定魅刀利
Dimitri Bouniol
email@hidden
http://www.appkainime.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