Charlie Fish
Charlie Fish

Reputation: 20536

How to fix inequality constraint ambiguity in iOS storyboard?

Below is a screenshot of my current view controller.

enter image description here

The problem I'm trying to solve is currently the container view text gets pinned to the top of that UIView.

I have it setup this way to on smaller devices it has a scroll view and this way it's easiest for me to visualize and layout the elements.

So my goal is to set a max height on that UIView/container view (on the left) to have a max height of 190px (since that is the tallest the content will ever be).

enter image description here

I tried the above solution but it gives me an error saying inequality constraint ambiguity.

My goal is to just have a max height of 190px and center that view horizontally and vertically.

How can I achieve this?

EDIT

Changing bottom space to manage subscription to = instead of >= produces the following.

enter image description here

Upvotes: 4

Views: 4130

Answers (1)

ZeMoon
ZeMoon

Reputation: 20274

You can fix this ambiguity by placing a low priority height constraint on the View with the height = 190.

This will act as a placeholder height constraint which can be overriden by the higher priority <= 190 constraint anytime.

Upvotes: 14

Related Questions