Occasionally my table view won\'t be connected to a service to refresh, and in that case, I don\'t want the UIRefreshControl to be present.
After I add it in viewDid
I had bad experience when set tableView.refreshConrol = nil , because when I set it back to old refreshControl, it started animation only in a second, so it looked not good, so when I need to disable refreshControl I use:
tableView.refreshControl?.endRefreshing()
tableView.refreshControl?.alpha = 0
when I need it back I use:
tableView.refreshControl?.alpha = 1
// and if I need to show refreshing indicator immediately I write:
tableView.refreshControl?.beginRefreshing()
P.S. Setting isHidden, isEnabled, isUserInteractionEnabled didn't help