Search code examples
objective-cxcodecocoansviewautoresizingmask

setAutoresizingMask doesn't work


I am trying to code a programm from this tutorial:

After setting below code snippet in my code, nothing changes.

 [[_ourViewController view] setAutoresizingMask:NSViewHeightSizable| NSViewWidthSizable]; 

When I run the application, views are still in the upper left corner.

Why doesn´t this work ?

Best regards, Robby


Solution

  • I found the solution ! You have to use constraints in der Interface Builder !