I do not know why it is proving to be so difficult, but basically I want to animate an NSView across my screen, and once it is done that animation, remove that NSView. It however seems that I can find absolutely no reference on how to do this. Can someone please help?
I am starting my animation like this
NSRect frame = blob.frame;
frame.origin.x = animationStopX;
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:timeToDisappear];
[[blob animator] setFrame:frame];
[NSAnimationContext endGrouping];
I have no way of getting a callback from this once it completes or anything.
Right after your
beginGroupingstatement, add this:setCompletionHandler:is a method in theNSAnimationContextclass.