I am trying to move the NSView grid up by showing another row from another NSView . Then, as soon as the animation is complete, the second NSView will disappear, and the first will immediately return to its original position with the new data.
It works 4/5 seconds. The only error I get is when the first view does not match reset to its original position; it stays when the animation ends.
Here is the basic idea (I have no code here):
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){ [[myView animator] setFrame:newPos]; } completionHandler:^{ [myView setFrame:originalPos]; }];
I'm having trouble with Google since runAnimationGroup:completionHandler is new in Lion.
source share