0

I'm very new to Autolayout. I'm building an iOS 7 app with Xcode 5 and I want realize a login page that appears in a way in Portrait and in another way in Landscape.

This is what I want:

enter image description here

The problem is that I have problem to set the elements in different position for Portrait among Landscape. Without using autolayout, this is very easy by using hard coded position programmatically, but I want use autolayout. Can anyone explain me how to achieve this ?

I also read the Ray Wenderlich tutorial, but doesn't explain a case similar to mine.

And I also read this post.

Thanks.

Community
  • 1
  • 1
Fry
  • 6,235
  • 8
  • 54
  • 93
  • 1
    I don't think this is possible solely by relying on Autolayout from Storyboard, you'll have to add, edit or remove constraints programatically based orientation. – Lord Zsolt Apr 01 '14 at 08:37
  • So, Autolayout is for "adjust" interface for orientation, not for "completely change" it ? – Fry Apr 01 '14 at 08:38
  • 1
    Yeah, though you will have to add like 20 constraints, and at least 10 of them you won't change, for the rest you can create outlets and modify them. Try working on paper, figure out what constraints you need for each orientation, then figure out which you need in both cases, add them in IB, and the rest, handle in code. – Lord Zsolt Apr 01 '14 at 08:42

0 Answers0