Setup:
- UINavigationController with prefersLargeTitles set to true on the nav bar
- Initial view controller in nav controller: UIViewController with UIScrollView as main view's first subview
- UIScrollView has refresh control property set to UIRefreshControl
let refreshControl = UIRefreshControl()
refreshControl.addTarget(self, action: #selector(reloadData), for: .valueChanged)
mainScrollView.refreshControl = refreshControl
Problem:
When I pull to refresh, the UIRefreshControl's indicator tries to spin but the .valueChanged event is not fired. If I navigate to the next view controller in the nav stack and come back to the first view controller, it works fine. The .valueChanged event is fired and reloadData() function is called. If I set prefersLargeTitles to false, it works fine from the start without navigating away from the initial view controller.
Has anyone else noticed this?