• 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: Resizing NSView with CABasicAnimation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resizing NSView with CABasicAnimation


  • Subject: Re: Resizing NSView with CABasicAnimation
  • From: Bill Dudney <email@hidden>
  • Date: Tue, 15 Apr 2008 21:01:19 -0600

Hi Michael,

Are you layer backed or layer hosting (i.e. did you se the layer explicitly?) If you are layer hosting then add he explicit animation to the view instead of the layer (when layer backing you should not manipulate the layer directly).

If you are doing layer hosting then try leaving the 'from' and 'to' values out.

HTH,


-bd- http://bill.dudney.net/roller/objc

On Apr 15, 2008, at 6:54 PM, Michael Fey wrote:

Folks,

I'm trying to perform a basic resize on an NSView subclass using an explicit animation. The code compiles and runs without crashing, but also without performing the resize. I'm obviously missing something very basic, but I haven't been able to find the answer elsewhere. Here's my sample code:

CABasicAnimation* resizeAnimation = [CABasicAnimation animationWithKeyPath:@"frame.size"];
[resizeAnimation setDelegate:self];
resizeAnimation.duration = 3.0;
resizeAnimation.fromValue = [NSValue valueWithRect:[self frame]];
resizeAnimation.toValue = [NSValue valueWithRect:largerRect];
[[self layer] addAnimation:resizeAnimation forKey:@"frame"];


Thanks for any insights.

Regards,
    Michael Fey
_______________________________________________

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

_______________________________________________

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: Resizing NSView with CABasicAnimation
      • From: Scott Anguish <email@hidden>
References: 
 >Resizing NSView with CABasicAnimation (From: Michael Fey <email@hidden>)

  • Prev by Date: Re: CGBitmapRef and User Space Coordinates
  • Next by Date: Re: NSURL and certificates
  • Previous by thread: Resizing NSView with CABasicAnimation
  • Next by thread: Re: Resizing NSView with CABasicAnimation
  • Index(es):
    • Date
    • Thread