Опция 1
float Y = 100;
float X = 200;
NSRect frame = [window frame];
frame.origin.y -= Y;
frame.size.height += Y;
frame.size.width += X;
[window setFrame:frame display:YES animate:YES];
Опция 2
float Y = 100;
float X = 200;
NSRect frame = [window frame];
frame.origin.y -= Y;
frame.size.height += Y;
frame.size.width += X;
NSDictionary *windowResize = @{
NSViewAnimationTargetKey: window,
NSViewAnimationEndFrameKey: [NSValue valueWithRect:frame]
};
NSDictionary *oldFadeOut = @{
NSViewAnimationTargetKey: [NSNull null],
NSViewAnimationEffectKey: NSViewAnimationFadeOutEffect
};
NSDictionary *newFadeIn = @{
NSViewAnimationTargetKey: [NSNull null],
NSViewAnimationEffectKey: NSViewAnimationFadeInEffect
};
NSArray *animations = @[windowResize, newFadeIn, oldFadeOut];
NSViewAnimation *animation = [[NSViewAnimation alloc] initWithViewAnimations: animations];
[animation setAnimationBlockingMode: NSAnimationBlocking];
[animation setAnimationCurve: NSAnimationEaseIn];
[animation setDuration: 2];
[animation startAnimation];