Doug Smith Doug Smith - 2 months ago 6
iOS Question

How do I "hide" a UIRefreshControl?

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

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