Xcode 7 - Limitations - equal distance between buttons

I am trying to get a horizontal equal distance between 11 buttons, I tried with IB, but I can not get the buttons in space the same in different screen sizes. I also want to increase the size of the buttons and keep the ratio of each button on the big screen.

3.5 inch enter image description here

5.5 inch enter image description here

I am trying to set all the settings for various restrictions, but I can’t get it right. Is this possible, and if so, how?

+4
source share
2 answers

To place 11 buttons at the same distance, place 10 slots between them:

11 buttons


Set the following restrictions:

  • .
  • Trailing Space to Container View Margin .
  • . 0.
  • (, 64).
  • . 1:18. .
  • 11 ( shift 11. . 1 .
  • 10 .
  • .
  • 11 10 .
  • 10 .

iPhone 4S (3,5 ):

iPhone 4S Simulator


iPhone 6S Plus (5,5 ):

enter image description here

+9

UIStackView ""

+3

Source: https://habr.com/ru/post/1650244/


All Articles