1

I have about 3 or 4 buttons on a view. They have vertical spacing. I want something like this:

In portrait those spacings = 100

In landscape those spacings = 200

How can I achieve this with autolayout by Interface Builder

Cœur
  • 37,241
  • 25
  • 195
  • 267
Khoi Nguyen
  • 137
  • 1
  • 9

1 Answers1

0

In IB use size class wRhR size class for ipad. For iPad there is no separate size class for landscape mode and portrait mode. You can do it using progarmatically using outlets.

There is way to do it in IB if you override trait collections in your code and override any size class relevant to you.

rishu1992
  • 1,414
  • 3
  • 14
  • 33