I'm implementing chat feature in my app where I want to show more chat message when user pulls to refresh something similar to what we have on iMessage. I've been exploring various options but couldn't find any simple solution to implement this. 

I've already implemented pull to refresh feature. Can anyone write steps or code to implement this feature either in pull to refresh function or using any table view delegate methods? 

P.S. I don't want to use cocoapods or any 3rd party code.

Here is my pull to refresh function

```
    // Pull to refresh
    @objc func refresh(_ refreshControl: UIRefreshControl) {
    fetchMessages(completed: {
        self.messagesTable.reloadData()
    })

    refreshControl.endRefreshing()
}

```