NSViewAnimation reversed when using NSAnimationEaseOut
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