Example for my question on SO: UIScrollView + Centered View + Ambigous Scrollable Content Size + many iPhone sizes
The initial state, with existing problems: 0a8bf35
And resolved Has ambiguous scrollable content width
and Has ambiguous scrollable content height
annoying warnings : 3b3e874
- scrollView with 0 constraints to all edges
- Button centered Horizontal and Vertical with fixed Width and Height
- And, of course
Has ambiguous scrollable content width
andHas ambiguous scrollable content height
annoying warnings.
- Add 2 additional constraints, for example "0" for trailing and/or bottom space for our view (in my case - UIButton)
Important: you have to add trailing and/or bottom constraints. Not "leading and top" - it's not works!
You can check it in my example project, that demonstrating how to fix this issue: ScrollViewAmbigous
P.S.
I don't know why it works and how Xcode detect which constraint is more prioritised (because I'm not set priority for these constraints explicity), but I'll be thankful if someone explain, why it works.
When you want to align multiple elements, say three button in one vertical line, you'll have to set the above said additional constraints to the bottom most element. (example included)