NSViewAnimation reversed when using NSAnimationEaseOut

  • 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-nsanim
    ationeaseout.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
  • On May 11, 2012, at 2:35 PM, Markus Spoettl <ms_lists...> wrote:

    > 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.

    Definitely log this as a bug.

    corbin
previous month may 2012 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today