0

I want to horizontally place 4 subviews in a screen-width view, and I want the subviews to be evenly distributed (with equal horizontal spacing).

One way to do it is to use hidden placer-views, and add equal-width constraints: Evenly space multiple views within a container view

This answer is written in 13, so I am wondering if there is a more elegant solution to the problem today, without introducing hidden views.

  1. I know about UIStackView, but it's in iOS 9.0, and I need to support at least iOS 8.0.
  2. Programmatically adding spacing constraints obviously works. But I prefer using the storyboard to solve this.
NeoWang
  • 17,361
  • 24
  • 78
  • 126

0 Answers0