In IB, how do I get a sub to stay the same size as the parent when I resize the parent?

In Interface Builder, I have one parent view and a subview under it.

I would like to have it so that when I work in IB, if I move / change the position of the parent view, that the view moves with it, so it continues to be the same size and shape.

Is there any way to do this?

Note. I am talking about using IB in development mode (i.e. I'm not talking about how the program works, but about the ability to change position, etc. using code).

+4
source share
2 answers

Highlight AutoResizingMask .

+3
source

In the Builder (IB) interface, you need to select all auto-rubberizing lines. See the circle at the bottom of the screenshot.

enter image description here

+6
source

All Articles