0

I have a Horizontal StackView. Later I add 2 views: UILabel & UIButton.

My current StackView

Current problem: UILabel only takes minimum width, it only takes enough width to show text, UIButton take the rest. enter image description here Expected result: UILabel take much width as possible while UIButton only take enough width to show its text.

I tried to add left constraint for UILabel, right for UIButton but no luck. What i tried:

  • Option 1: Fix the UIButton width, then UILabel takes the rest, but not good in multi language.

  • Option 2: Let UIButton takes the width, but set its align to the right. But its limitation is clicking range too large.

This is what i expected: enter image description here

Thanks!

Harry T.
  • 3,478
  • 2
  • 21
  • 41

0 Answers0