title: Xcode - Constraints on iPad - Landscape vs Portrait
body: <p>I can't seem to figure out constraints and auto layout.How can I have the spacing between two objects be different on the iPad when in landscape and portrait. </p>
  
  <p>I placed to UIViews side by side. When in portrait I would like the spacing between them to be 40 but when in landscape it can be larger because there is more width.</p>
  
  <p>This is what it looks like in portrait mode. Which I am happy with.
  <a href="https://i.stack.imgur.com/QOmkL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QOmkL.png" alt="Portrait"></a></p>
  
  <p>And here it is in landscape. As you can see it doesn't seem to fill the screen as well and there ends up being a lot of empty space.
  <a href="https://i.stack.imgur.com/KZdN2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KZdN2.png" alt="Landscape"></a></p>
  
  <p>Any suggestions? Thank you!</p>