iOS 11 beginRefreshing programmatically with large title on navigation bar

Viewed 1585

In iOS 10, I used to begin refreshing the UIRefreshControl (show the refresh control programmatically) programmatically like this:

self.tableView.setContentOffset(CGPoint(x: 0, y: - self.refreshControl.bounds.height), animated: false)
self.refreshControl.beginRefreshing()

But now with iOS 11 that code doesn't work, it does only make a mess with the size of the UINavigationController and the UIRefreshControl doesn't appear.

How can I begin refreshing programmatically the UIRefreshControl (show the refresh control programmatically) using prefersLargeTitles from iOS 11?

1 Answers
Related