Re: CATextLayer question
Re: CATextLayer question
- Subject: Re: CATextLayer question
- From: Davide Scheriani <email@hidden>
- Date: Thu, 5 Jun 2008 19:44:06 +0200
nooo I dont believe it!!!!! :)
I come from Flash and Core Animation is like Fuse Framework of Moses.
Is a way to have some sort of "collision" method of one or more layers?
On Jun 5, 2008, at 9:04 , Davide Scheriani wrote:
I was playing with my NSView and CATextLayer.
I placed this code:
-(void)mouseDown:(NSEvent *)theEvent
{
// [...snip...]
[rootLayer addSublayer:textLayer];
}
what ive noticed is when I click,the text appear with a fadein.
Any reason of this behaviour?
Modifying most layer properties as well as adding/removing sublayers
generates implicit animations. You can temporarily disable
animations by wrapping the relevant code in a CATransaction:
- (void)mouseDown:(NSEvent *)theEvent
{
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue
forKey:kCATransactionDisableActions];
// [...snip...]
[rootLayer addSublayer:textLayer];
[CATransaction commit];
}
/brian
_______________________________________________
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