• 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
NSViewAnimation reversed when using NSAnimationEaseOut
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSViewAnimation reversed when using NSAnimationEaseOut


  • Subject: NSViewAnimation reversed when using NSAnimationEaseOut
  • From: Markus Spoettl <email@hidden>
  • Date: Fri, 11 May 2012 23:35:01 +0200

Hello,

using NSViewAnimation to animate a window frame, when I set the animationCurve to NSAnimationEaseOut, the animation is reversed. I triple-checked and logged the frames and they are set up correctly. The animation dictionary looks like this:

   {
        NSViewAnimationEndFrameKey = "NSRect: {{1219, 900}, {376, 283}}";
        NSViewAnimationStartFrameKey = "NSRect: {{1213, 900}, {408, 307}}";
        NSViewAnimationTargetKey = "<SOShapeWindow: 0x10916fe20>";
    }

yet the window expands, instead of shrinking. If I set NSAnimationEaseIn as animationCurve it works "correctly", just with the wrong animation curve.

Even more puzzling is the fact that this has been around for more than 5 years:

http://www.cocoabuilder.com/archive/cocoa/172342-nsviewanimation-bug-nsanimationeaseout.html

Please tell me that's a configuration issue (code below).

Regards
Markus

NSArray *shrinkAnimation = [NSArray arrayWithObjects:
  [NSDictionary dictionaryWithObjectsAndKeys:
     self, NSViewAnimationTargetKey,
     [NSValue valueWithRect:expandedFrame], NSViewAnimationStartFrameKey,
     [NSValue valueWithRect:targetFrame], NSViewAnimationEndFrameKey,
     nil]];
NSViewAnimation *shrink = [[NSViewAnimation alloc]
                              initWithViewAnimations:shrinkAnimation];

NSLog(@"%@", shrinkAnimation);

[shrink setDuration:durationShrink];
[shrink setAnimationCurve:NSAnimationEaseOut];

[shrink startAnimation];

--
__________________________________________
Markus Spoettl
_______________________________________________

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: NSViewAnimation reversed when using NSAnimationEaseOut
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Layer hosting custom NSView and setAlphaValue
  • Next by Date: Re: architectures that prevent freezing
  • Previous by thread: Re: Layer hosting custom NSView and setAlphaValue
  • Next by thread: Re: NSViewAnimation reversed when using NSAnimationEaseOut
  • Index(es):
    • Date
    • Thread