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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to