I'm making the transition from programming iPhone to native Mac applications. One part that I miss is the simplicity of the UIView animation system.

I had the following two methods for a UIView subclass:

-(void) hide{
    _isHidden=YES;
    [UIView commitAnimations];
    [UIView beginAnimations:nil context:nil]; 
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:0.5];  
    self.alpha = 0;
    [UIView commitAnimations];
}
-(void) show{
    _isHidden=NO;
    [UIView commitAnimations];
    [UIView beginAnimations:nil context:nil]; 
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:0.5];  
    self.alpha = 1;
    [UIView commitAnimations];    
}

Now I'm not sure how to accomplish this in Cocoa. I tried the following but I'm not sure it works as it should.

-(void) hide{
    [[_myView animator] setAlpha:0];
}

I call this function (hide) multiple times sometimes while the fade function might still be running.

Edit
Report