Martin Perry
Martin Perry

Reputation: 9527

iOS - auto layout rotation not working as expected

I have app with enabled rotation for iPad (iPhone version is rotation-free). In my design, within storyboard, I have this hierarchy: UIView - UIScrollView - UIView. All "views" are set to have full width of the screen. Second UIView has class set to MyView, which is a class with an external xib file. Storyboard and xib are both created in a portrait mode.

Now for the problem.

No matter what I do, I am unable to remove this problem. Even If I deleted almost every constraint I have still the same issue.

Upvotes: 0

Views: 403

Answers (1)

Damien
Damien

Reputation: 3362

You should look if you don't have any auto layout warnings in your storyboard or xib file (yellow/red dot beside your controller name in document outline).

If you don't have any, do you set your constraints when adding your xib view ?

Have you think about content hugging priority or content compression resistance priority ?

Upvotes: 1

Related Questions