0

Hi I have created a popup view and have added a view's leading,trailing,top and bottom spacing say 5 px, not my view looks good in iPhone.

But for iPad, behaviour is same and it is setting same 5 px for all spacing, now i for iPad it need to increase that spacing so my view will become some smaller and fit in centre.

Is that possible without code? I added all autolayout constraint through XIB.

enter image description here

PJR
  • 13,052
  • 13
  • 64
  • 104

2 Answers2

2

Yes PJR. You can do this using the size classes. Change the WAny hAny to wRegular hRegular in your storyboard. And now update the required constants values. Whatever the changes u made in wRegular hRegular will be only applicable for iPad. Hope this helps

.

Community
  • 1
  • 1
Deepak Pillai
  • 345
  • 2
  • 3
  • 12
0

just set horizontally in container (center X) and vertically in container constraint (center Y) and width and height constant