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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]