How do I "hide" a UIRefreshControl?

Doug Smith picture Doug Smith · Oct 20, 2013 · Viewed 22.7k times · Source

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 viewDidLoad, I've tried hiding it under certain circumstances with setEnabled: and setHidden: but neither seems to work.

Answer

Jonathan Arbogast picture Jonathan Arbogast · Oct 20, 2013

Try setting your table view controller's refreshControl property to nil.