• 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: What is the default time for a CALayer transform?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: What is the default time for a CALayer transform?
      • From: Gustavo Pizano <email@hidden>
References: 
 >What is the default time for a CALayer transform? (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: More - Safari Download Security Alerts
  • Next by Date: Re: How to make a CALayer dont get blur when rotating.
  • Previous by thread: What is the default time for a CALayer transform?
  • Next by thread: Re: What is the default time for a CALayer transform?
  • Index(es):
    • Date
    • Thread