title: Height of contentView of UIScrollView based on inside content using Storyboard
body: <p>I'm actually facing difficulties to make my <code>UIScrollView</code> fully responsive using only <strong>storyboard constraints</strong>.</p>
  
  <p>Here is my hierarchy :</p>
  
  <pre><code>&gt; - UIViewController
  &gt;  - UIView
  &gt;   - UIScrollView
  &gt;    - contentView
  &gt;     - module1View
  &gt;     - module2View
  &gt;     - module3View
  </code></pre>
  
  <p>All the modules are used to display charts. <strong>I want them to be responsive</strong>. I want their width to be 100% of the screen and their height is defined by a <strong>ratio</strong> added using constraint. The modules are displayed next to each other like news in a newsfeed.</p>
  
  <p>My question is : How do you set the <code>contentView</code> height equal to the sum of all the modules (module 1 + 2 + 3) ?</p>
  
  <p>In other word I want to achieve : </p>
  
  <blockquote>
    <ul>
    <li>Top of contentView = top of module 1</li>
    <li>Top of module 2 = bottom of module 1</li>
    <li>Top of module 2 = bottom of module 2</li>
    <li>Bottom of contentView = bottom of module 3</li>
    </ul>
  </blockquote>
  
  <p>To managed to do that I follow some tutorial found on internet. Here are the steps I followed :</p>
  
  <ol>
  <li>Setting <code>UIScrollView</code> contraints to define its <strong>place and position</strong>.</li>
  <li>Setting <code>UIScrollView</code> <strong>top</strong>, <strong>bottom</strong>, <strong>left</strong> and <strong>right spacing</strong> to nearest neighbour to <strong>0</strong>.</li>
  <li>Setting the <strong>constraint</strong> between modules to "stack" them one on an
  other.</li>
  <li><strong>(I'M BLOCKED HERE)</strong> Setting the bottom of the <code>contentView</code> to the
  bottom of module 3 to allow the <code>UIScrollview</code> to scroll until the end
  content.</li>
  </ol>
  
  <p>I tried to force the height of <code>UIScrollView</code> : It works but it's not responsive. As the height of the module is calculated through a ratio, depending on the device, the height "module 1 + 2 + 3" while change.</p>
  
  <p>I tried to add a constraint from module 3 to <code>contentView</code> to set the bottom of module 3 = bottom of <code>contentView</code>. All the constraints turn red with warning everywhere.</p>
  
  <p>Do you have any idea to how to set height of <code>contentView</code> based on a responsive content ? (Like "wrap-content in a way).</p>
  
  <p>Thanks in advance for you help !</p>