Re: What is the default time for a CALayer transform?

2008-12-16 Thread Dimitri Bouniol
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

Re: What is the default time for a CALayer transform?

2008-12-16 Thread Klaus Backert
On 16.12.2008, at 15:27, Gustavo Pizano wrote: Hello Dimitri. CAAnimation* rotateAnimation = [CABasicAnimation animationWithKeyPath:@transform]; rotateAnimation.fromValue = [NSValue valueWithCATransform3D:nLayer.transform]; rotateAnimation.toValue = [NSValue

Re: What is the default time for a CALayer transform?

2008-12-16 Thread Gustavo Pizano
Yes it was CABasicAnimation. Dimitri made just a typing mistake. Gustavo On 16.12.2008, at 16:34, Klaus Backert wrote: On 16.12.2008, at 15:27, Gustavo Pizano wrote: Hello Dimitri. CAAnimation* rotateAnimation = [CABasicAnimation animationWithKeyPath:@transform];

Re: What is the default time for a CALayer transform?

2008-12-16 Thread Gustavo Pizano
Dimitri Hi using CAAnimation this is what I was doing: -(void)mouseDown:(NSEvent *)event { [event retain]; [mouseDownEvent release]; mouseDownEvent = event; NSPoint p2 = [event locationInWindow]; NSPoint p3 = [self convertPoint:p2 fromView:nil];

What is the default time for a CALayer transform?

2008-12-16 Thread Gustavo Pizano
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

Re: What is the default time for a CALayer transform?

2008-12-16 Thread Dimitri Bouniol
-(void)mouseDown:(NSEvent *)event { [event retain]; [mouseDownEvent release]; mouseDownEvent = event; NSPoint p2 = [event locationInWindow]; NSPoint p3 = [self convertPoint:p2 fromView:nil]; CGPoint p = NSPointToCGPoint(p3); CALayer *

Re: What is the default time for a CALayer transform?

2008-12-16 Thread Gustavo Pizano
Hello Dimitri. CAAnimation* rotateAnimation = [CABasicAnimation animationWithKeyPath:@transform]; rotateAnimation.fromValue = [NSValue valueWithCATransform3D:nLayer.transform]; rotateAnimation.toValue = [NSValue valueWithCATransform3D:transform]; its gives me an error, Error request