0
votes

Im am building a user interface using storyboard and autolayout and i'm struggling with layout and constraints, I have a UIView (container) that contains 1 UIView and 2 labels, the UIView has an 16:9 aspect ratio and the two labels are in a UIView with a center vertically constraint witch gives me this in IB : storyboard layout

for some reasons, probably wrong constraints or missing constraints, layout is different at runtime, (I don't have any auto-layout issues in IB)

view at runtime not center

So how can I center vertically these 2 labels in my container

I need your help, thank you!

1

1 Answers

0
votes

The 2 labels should use another view to contain.And make constraint referenced from the green view.The last,you need to make constraint 2 labels to the view you have created just now.The center vertically constraint need refer to the view contains 2 labels