I had the same problem though I set all constraints from XIB. You can do like this.
Add leading edge, trailing edge, top space and bottom space constraints to labels with respect to container view. Then you can add these same constraints to container view with respect to scrollView. Do the same exercise for scrollView. You just need to add one more constraint (Horizontally center in container view constraint)to container view. Hope this will help you.