Search code examples
iosuinavigationcontrolleruikituirefreshcontrol

Wrong UIRefreshControl behaviour when UINavigationBar.prefersLargeTitles is on


[iOS 12] The UIRefreshControl's indicator doesn't work as expected when I "pull to refresh" using large titles in the navigation bar.

How can I have the right UIRefreshControl's indicator behaviour and using large titles? Am I missing something?

(Related https://forums.developer.apple.com/thread/97713)


With self.navigationController.navigationBar.prefersLargeTitles = true:

enter image description here


With self.navigationController.navigationBar.prefersLargeTitles = false:

enter image description here


Solution

  • instead of tableView.tableHeaderView = refreshControl or tableView.addSubView(refreshControl) you should use tableView.refreshControl = refreshControl