A standard control that can initiate the refreshing of a scroll view’s contents.
- iOS 6.0+
You can use a refresh control in a scroll view or an object that inherits from
UIScroll, such as
UICollection. You link a refresh control to a scroll view through an associated view controller object. The view controller handles the work of adding the control to the view’s visual appearance and managing the display of that control in response to appropriate user gestures.
In addition to assigning a refresh control to a view controller’s
refresh property, you must configure the target and action of the control itself. The control does not initiate the refresh operation directly. Instead, it sends the
value event when a refresh operation should occur. You must assign an action method to this event and use it to perform whatever actions are needed.
The view controller object that owns a refresh control is also responsible for setting that control’s frame rectangle. Thus, you do not need to manage the size or position of a refresh control directly in your view hierarchy.