Bob
Bob

Reputation: 1447

UIStackView set priority to a child view

Is it possible to set priority to a child view of a UIStackView like it would be done in android. Set height to 0 and set view`s weight to 1.5 for example? I want my view to fill little bigger than a half of a screen.

Upvotes: 0

Views: 471

Answers (1)

Zuzana Paulis
Zuzana Paulis

Reputation: 951

You can set Aspect Ratio constraint for your View for example:

  • your view height/width can be 1/3 of your parenting/neighbouring view height/width
  • your view height can be 1/5 of its width

Upvotes: 1

Related Questions