This small instruction will be helpful for those of you who encountered problems with adding scrollable view to your app and for those of you who had an error of Scrollable content size ambiguity. Here’s how you can solve your problem. The simplest way is to use autolayout :

Add UIScrollView your main view and pin it to superview with a zero indentation for all sides of Safe Area of parent UIView(or your desired size).

2. Add a new UIView in ScrollView, pin it 0,0,0,0 to all 4 sides of the Content Layout Guide of your ScrollView. Then add Equal Width and Equal Height constraints to the Frame Layout Guide.

Pin your view 0,0,0,0 to all 4 sides of the Content Layout Guide

Add Equal Width and Equal Height constraints to the Frame Layout Guide

3. In size inspector, change Equal Height priority to 250 if you want your scrollview to be vertical(for horizontal scroll change Equal Width constraint).

4. Add all views that you need into this view. Don’t forget to add bottom constraint to the lowest element in your app.

I hope these instructions will help you solve your problem. If not, please write a comment below or hit me up on twitter or instagram. We’ll figure something out together.