Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in IB how do I get a subview to stay at the same size as it's parent when I resize the parent?

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

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

Is there a way to do this?

Note I'm talking about use of IB in design mode (i.e. I'm not talking about once the program is running and the ability to be able to change position etc via code)

like image 565
Greg Avatar asked Jan 19 '23 08:01

Greg


2 Answers

In Interface Builder (IB) You need to select all the Autoresize lines. See circle in below screenshot.

enter image description here

like image 198
Deeps Avatar answered Jan 31 '23 05:01

Deeps


CHeck out the AutoResizingMask.

like image 24
WrightsCS Avatar answered Jan 31 '23 07:01

WrightsCS