Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 746
Charlie Fish Avatar asked Dec 07 '22 18:12

Charlie Fish


1 Answers

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.

like image 69
ZeMoon Avatar answered Dec 11 '22 09:12

ZeMoon