jylee
jylee

Reputation: 843

How to change view layouts when orientation changes?

I have a view controller with some elements, like 3 UIViews on the side.

When I change the orientation, I want them to move down to the bottom instead.

How should I achieve this? Should I have two separate nibs for each layout?

(It would be nice to be able to do this in interface builder instead because I don't want to code the positions of each elements).

Upvotes: 2

Views: 374

Answers (1)

Quirin
Quirin

Reputation: 720

Two seperate xibs is a good idea, if your layout of the orientations vary tremendously.

But if the Views are in portrait on bottom and should keep this behavior in landscape, then go to your Interface Builder and set the Autosizing-Arrows in Tab "Size Inspector" to arrange the views.

Upvotes: 1

Related Questions