title: Autolayout. Set two views vertically with dynamic height
body: <p>I have a view1 which can have dynamic height depending upon content with in it. Just below that view, I have to show the table view. Top space constraint of tableview is view1 and bottom constraint of tableview is view 3 that has fixed height and stick to the bottom. </p>
  
  <p>The problem is that I can neither set height constraint of view1 nor tableview as top view can be dynamic and tableview have to take remaining height that varies in different device and I am getting error:</p>
  
  <p>"Need constraint for Y position or height" for both view 1 and tableview. Although I have set costraint for y position for all views.</p>
  
  <p>How should I solve this.<a href="https://i.stack.imgur.com/8RdVc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8RdVc.png" alt=""></a></p>