Move other Views to the view which is hidden
<p>hello I am new to IOS and I am struggling in one functionality which I am trying to implement. I have a <code>UIViewController</code> in which I am showing a custom <code>UIView</code> on the top and the below I have a dynamic <code>TableView</code>. I am hiding and showing the custom UIView on some conditions but the problem is If I hide it, my table don't take a place of that view so I can see the space over there. I think I have do something with the autolayout but I am not good in autolayout so If any one can help would be great. I am attaching a demo screens here so that you can understand. What should I do to make it work so that table will take the custom UIView place when  <code>UIView</code> is hidden</p>

<p><a href="https://i.stack.imgur.com/JJIkH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JJIkH.png" alt="enter image description here"></a></p>

<p>This is the result I am getting If I hide the above portion Custom UIView</p>

<p><a href="https://i.stack.imgur.com/SrVqX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SrVqX.jpg" alt="enter image description here"></a></p>