How can I reveal the UIRefreshControl when I update the table programmatically? Using [self.refreshControl beginRefreshing] make the spinner animate but does not reveal it.
For Swift 5, this is the only working version for me.
extension UIRefreshControl {
func beginRefreshingManually() {
if let scrollView = superview as? UIScrollView {
scrollView.setContentOffset(CGPoint(x: 0, y: scrollView.contentOffset.y - frame.height), animated: false)
}
beginRefreshing()
sendActions(for: .valueChanged)
}
}