RohitK
RohitK

Reputation: 1494

How to set autolayout constraint for iPhone and iPad

I want to set the view on iPhone(portrait) and iPad(landscape) such that: 1. on iPhone view must take full width of screen (In portrait). Please check following screen shot.

enter image description here

  1. on iPad the same view must be of size 500px width (in landscape)

enter image description here

How should I do it in one view only?

Upvotes: 1

Views: 2350

Answers (1)

RohitK
RohitK

Reputation: 1494

I am able to achieve this using 'Vary for Traits' option, please check following image :

enter image description here

Using this option I am able to set the constraints specific to iPhone or iPad.

Upvotes: 1

Related Questions