A standard control that can initiate the refreshing of a scroll view’s contents.
SDKs
- iOS 6.0+
- Mac Catalyst 13.0+
Framework
- UIKit
Declaration
class UIRefreshControl : UIControl
Overview
A UIRefresh
object is a standard control that you attach to any UIScroll
object, including table views and collection views. Add this control to scrollable views to give your users a standard way to refresh their contents. When the user drags the top of the scrollable content area downward, the scroll view reveals the refresh control, begins animating its progress indicator, and notifies your app. You use that notification to update your content and dismiss the refresh control.

The refresh control lets you know when to update your content using the target-action mechanism of UIControl
. Upon activation, the refresh control calls the action method you provided at configuration time. When adding your action method, configure it to listen for the value
event, as shown in the following example code. Use your action method to update your content, and call the refresh control’s end
method when you are done.
func configureRefreshControl () {
// Add the refresh control to your UIScrollView object.
myScrollingView.refreshControl = UIRefreshControl()
myScrollingView.refreshControl?.addTarget(self, action:
#selector(handleRefreshControl),
for: .valueChanged)
}
@objc func handleRefreshControl() {
// Update your content…
// Dismiss the refresh control.
DispatchQueue.main.async {
self.myScrollingView.refreshControl?.endRefreshing()
}
}
Note
UITable
also includes a refresh
property for managing the refresh behavior of its associated table.