Re: CATextLayer question
Re: CATextLayer question
- Subject: Re: CATextLayer question
- From: Brian Christensen <email@hidden>
- Date: Thu, 5 Jun 2008 11:38:01 -0400
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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