I’m trying to figure out auto layout constraints with a view in portrait and landscape. In portrait I have a container view (but any view will do) that is 320×200 pixels. When the phone is rotated to landscape, I would like that container view to fill the screen at 480×320.
Right now I’m doing this entirely in IB, and am trying to keep it that way for now. I struggle with the dang blue and purple constraint icons appearing when I try to set the the view to resize as I would like it to.
I’ve watched the WWDC auto-layout videos and have auto-layout working in other views, but I just can’t get this seeming simple change to occur.
Any help would be appreciated. Thank you.
I had to use inequalities. For example a text area width in portrait needs to be 100, but the landscape width needs to be >100 so it can stretch. Other constrains are in place to pull it to the sides already for me. I also enabled landscape modes. When I rotate now my 4 lines of text reflows to 2 lines very smartly.