Reputation: 987
Im using cocoa in xcode 4.4 and I have a window which contains a view loaded from an xib file. I have created another view inside it which i would like to resize to fill the outer view whenever i make the window fullscreen.
I have tried using:
[self setAutoresizingMask:NSViewWidthSizable];
And
[self setAutoresizingMask:NSViewHeightSizable];
And they work but obviously this only sizes the view in one direction. Is there a way of doing both?
Thanks in advance, Ben
Upvotes: 1
Views: 1582
Reputation: 499
[self setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
Upvotes: 2