Search code examples
iosswiftautolayoutstoryboard

Setting width constraint for label on Storyboard relative to the width constraint of another label in the same stack


How do I set the width constraint of my label on swift so that it is always equal to the width of another label in the same stack using the Storyboard?


Solution

  • Ctrl-click-drag from one label to the other.

    Release mouse button.

    Then select Equal Widths from the popup.