Put Pull to Refresh Control under TableView Header
<p>I have attached headerView to UITableView. And I also want to use pull to refresh with tableview. 
I have attached headerview to tableview with this code:</p>

<pre><code>tblView.tableHeaderView = headerView
</code></pre>

<p>and used redresh controll as:</p>

<pre><code>var refreshControl: UIRefreshControl!
refreshControl = UIRefreshControl()
refreshControl.attributedTitle = NSAttributedString(string: "Pull to refresh")
refreshControl.addTarget(self, action: #selector(self.refresh(_:)), forControlEvents: UIControlEvents.ValueChanged)

let tableController = UITableViewController()
self.addChildViewController(tableController)
tableController.tableView = self.tblView
tableController.refreshControl = self.refreshControl
</code></pre>

<p>Now issue is when I pull down tableview refreshcontrol showing but my header view position also changing with bounce effect. I don't want to change header position when I pulled down  I want to display refreshcontrol under header view.
my header view and refreshcontrol is shown in screenshots. I want header view's position static joined with navigation bar but when user scroll up headerview will also have to scroll.</p>

<p><a href="https://i.stack.imgur.com/8yOao.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8yOao.png" alt="When pulled"></a></p>