• 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: CALayer drawing "transition" effect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer drawing "transition" effect?


  • Subject: Re: CALayer drawing "transition" effect?
  • From: Joseph Kelly <email@hidden>
  • Date: Thu, 31 Jul 2008 14:15:03 -0700


On Jul 31, 2008, at 11:07 AM, Jens Alfke wrote:

The content of a layer is an animatable property, so by default, changing the content will do a crossfade. It seems that applies to custom content (drawn by -drawInContext:) as well as the "content" property.

There are a couple ways to suppress animations. You can use the CAContext API to disable all animations while you make your changes, or you can use the layer's "actions" dictionary to override the animation for the content transition.

Thanks!

I tried the following which seems to work. I'm not sure if it's the approved way or not:

- (id<CAAction>)actionForKey:(NSString *)event
{
	if ([event isEqualToString:@"contents"])
		return nil;
	return [super actionForKey:event];
}

(there was some mention of returning [NSNull null] to terminate further searching, but it just crashed when I did that)

Joe K.
_______________________________________________

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


References: 
 >CALayer drawing "transition" effect? (From: Joseph Kelly <email@hidden>)
 >Re: CALayer drawing "transition" effect? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Problem binding NSTextView's attributedString
  • Next by Date: Adding an NSColor subclass to NSColorPanel?
  • Previous by thread: Re: CALayer drawing "transition" effect?
  • Next by thread: compiler warning for not fully implementing protocol
  • Index(es):
    • Date
    • Thread