xcode - Center UIView inside UIScrollView using AutoLayout in the interface builder only -


i'm trying center view inside uiscrollview using interface builder only. labels seems working well.

enter image description here enter image description here

but when try same uiview, i'm having constraints conflicts.

enter image description here enter image description here enter image description here

the conflicts make sense, if delete width/height constraints uiview extends entire superview, , if delete top/lead/trail/bottom constraints, uiview correctly centers itself, ambiguous width/height warning.

enter image description here

my question be, how can uiview centered same uilabel?.

for future reference:

enter image description here enter image description here

but key thing set different contenthugging priority, autolayout work out conflicts:

enter image description here


Comments