6

I'm trying to slide a gridded NSView up, revealing another row from another NSView. Then, once the animation is done, the second NSView will dissapear, and the first will immediately move back to its original position with the new data.

It works 4/5s of the time. The only error I'm getting is when the first view doesn't reset to the original position; it stays were the animation finishes.

Here's the basic idea (I don't have the code here):

[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){
    [[myView animator] setFrame:newPos];
} completionHandler:^{
    [myView setFrame:originalPos];
}];

I'm having trouble Googling since runAnimationGroup:completionHandler is new in Lion.

Paulo Mattos
  • 18,845
  • 10
  • 77
  • 85
Stuart
  • 286
  • 2
  • 14

0 Answers0