title: How to make a stretchable tableView header in swift 4?
body: <p><a href="https://i.stack.imgur.com/oW4Im.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oW4Im.png" alt="First Image[![Second Image][1]"></a>]</p>
  
  <p><a href="https://i.stack.imgur.com/ro6z1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ro6z1.png" alt="enter image description here"></a></p>
  
  <p>Hello, I have uploaded two images. Initially, my screen will look like First Image. If the user scrolls up the screen, then the screen will look like the Second Image. I have searched in GitHub and internet for a stretchable header. I found a solution where a view has made programmatically. But I am unable to load more two views inside that particular view for the design purpose. If I load a custom UI view it is showing error in this function -></p>
  
  <pre><code>func scrollViewDidScroll(_ scrollView: UIScrollView) {
   let y = 300 - (scrollView.contentOffset.y + 300)
      let height = min(max(y, 60), 400)
      //imageView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: height)
      myNewView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: height)
  
  
  }
  </code></pre>
  
  <p>Help is much appreciated</p>