• 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: CATextLayer question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: CATextLayer question
      • From: Davide Scheriani <email@hidden>
References: 
 >CATextLayer question (From: Davide Scheriani <email@hidden>)

  • Prev by Date: Re: Newbie question:IB, NSView, NSViewController
  • Next by Date: Re: App hangs when displaying any sheet in 10.5 [SOLVED]
  • Previous by thread: CATextLayer question
  • Next by thread: Re: CATextLayer question
  • Index(es):
    • Date
    • Thread