I could not find an easy way to do this, so I wrote an animation function that would resize the window and move it at the same time, thereby giving the appearance of the animation.
- (IBAction)startAnimations:(id)sender{ NSViewAnimation *theAnim; NSRect firstViewFrame; NSRect newViewFrame; NSMutableDictionary* firstViewDict; { firstViewDict = [NSMutableDictionary dictionaryWithCapacity:3]; firstViewFrame = [window frame]; [firstViewDict setObject:window forKey:NSViewAnimationTargetKey]; [firstViewDict setObject:[NSValue valueWithRect:firstViewFrame] forKey:NSViewAnimationStartFrameKey]; newViewFrame = firstViewFrame; newViewFrame.size.height += 100; newViewFrame.origin.y -= 100; [firstViewDict setObject:[NSValue valueWithRect:newViewFrame] forKey:NSViewAnimationEndFrameKey]; } theAnim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:firstViewDict, nil]]; [theAnim setDuration:1.0]; [theAnim startAnimation]; [theAnim release]; }
source share