autoresizingmask for height and width
-
28-10-2019 - |
Question
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
Solution
[self setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow