Alternatively, you can create a view subtree to go in the scroll view, set up your constraints, and call the systemLayoutSizeFittingSize:method (with the UILayoutFittingCompressedSize option) to find the size you want to use for your content view and the contentSizeproperty of the scroll view.