How to configure different layouts for Portrait and Landscape Orientations using Auto Layout?

Viewed 3689

I have a view like in attached image

enter image description here

Now I am adding constraints such that the UITextview in the view has to be on the right hand side of the screen when orientation is changed to landscape. On UItextview, I have added below constraints,

  1. Trailing Space to : Superview
  2. Bottom Space to : Superview

These constraints though displayed some warnings on ambugity, did the job for me. Below is the screenshot of landscape mode.

enter image description here

My problem is though the UItextview is moved to right side, I want some additional width from top of superview when it is in landscape mode. In other words, I want the UITextview to be moved a little downward from where it is now in landscape mode. I am pondering how to do that using auto layout in IB and I am not able to figure that how.

Any suggestions please.

1 Answers
Related