Width and Horizontal Position Are Ambiguous

Glyphs picture Glyphs · Feb 9, 2016 · Viewed 10.7k times · Source

it seems I have created a simple Image view with the following constraints:

Align Center X to: Superview

Align Center Y to: Superview

Top Space to: Top Layout Guide

Bottom Space to: Bottom Layout Guide

And I have the Width and Horizontal Position Are Ambiguous message. I am trying to correct it, but I am not sure about what is happening in the first place.

Do you have an idea?

Answer

konrad.bajtyngier picture konrad.bajtyngier · Feb 9, 2016

You need to add the same constraint for left and right as you did for top and bottom.

Or set fixed width.