Use NSWindow setFrame: animated: method. If you want to resize the window down, make sure that you reduce the y coordinate of the beginning by the same amount as the window size. To also resize views in the window, make sure that you have correctly configured your autoresist properties.
NSWindow *window;
CGFloat widthChange, heightChange;
NSRect frame = [window frame];
frame.size.width += widthChange;
frame.size.height += heightChange;
frame.origin.y -= heightChange;
[window setFrame:frame animated:YES];
source
share