Questions tagged [uirefreshcontrol]

A UIRefreshControl object provides a standard control that can be used to initiate the refreshing of a table view’s contents. You link a refresh control to a table through an associated table view controller object. The table view controller handles the work of adding the control to the table’s visual appearance and managing the display of that control in response to appropriate user gestures.

UIRefreshControl is a control available in iOS 6.0 () and later.

A UIRefreshControl object provides a standard control that can be used to initiate the refreshing of a table view’s contents. You link a refresh control to a table through an associated table view controller object. The table view controller handles the work of adding the control to the table’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 table view controller’s refreshControl 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 UIControlEventValueChanged 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 UITableViewController () 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.

NOTE: Because the refresh control is specifically designed for use in a table view that's managed by a table view controller, using it in a different context can result in undefined behavior.

References:

493 questions
29
votes
9 answers

Offsetting UIRefreshControl

I am currently using a JASidePanel for my application and I have a UITableViewcontroller with a UIRefreshControl as one of the ViewControllers for it. The width of my tableview still has a width of 320 pixels so the UIRefreshControl gets centered…
user754905
  • 1,799
  • 3
  • 21
  • 29
29
votes
5 answers

Header Displaced in TableView with UIRefreshControl

My UIRefreshController is doing something odd. When I pull-down refresh, the tableView headers are displaced. If I pull-down it looks fine, but if I scroll down the table while the refresher is still working, the headers are offset by the height of…
Dave
  • 534
  • 1
  • 5
  • 14
26
votes
4 answers

UIRefreshControl on viewDidLoad

I'm using the following code to create a UIRefreshControl: - (void) viewDidLoad { [super viewDidLoad]; UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(doLoad)…
Kyle
  • 17,317
  • 32
  • 140
  • 246
23
votes
4 answers

How do I programmatically slide the UITableView down to reveal the underlying UIRefreshControl

How can I reveal the UIRefreshControl when I update the table programmatically? Using [self.refreshControl beginRefreshing] make the spinner animate but does not reveal it.
Dave Ronsom
  • 253
  • 3
  • 5
  • 9
20
votes
8 answers

iOS 10.0 UIRefreshControl not showing indicator

I am using a UITableView Which has a Pull down to refresh function but the spinner for pull down to refresh is not showing up when I call the [self.refreshControl beginRefreshing] The above code is called inside the viewDidLoad cause the table is…
dogwasstar
  • 852
  • 3
  • 16
  • 31
19
votes
3 answers

UIRefreshControl text overlays on refresh-indicator

I start with programming under XCode 5 with iOS 7 SDK. And when I create UITableViewController with UIRefreshControl with 'attributedText' I've got text overlayed on top of UIRefreshControl graphics (circle progress animation). But when I pull down…
woozly
  • 1,363
  • 1
  • 14
  • 24
18
votes
3 answers

iOS 11 UIRefreshControl with NavigationBar LargeTitle and SearchController disappearing

I have a navigationBar with largeTitle and searchcontroller and my tableView has a refreshcontrol. When I pull to refresh the activityIndicator of refreshcontrol disappear but de refresh process continues, even when the process finish and I call…
18
votes
4 answers

How Do I Shorten the Pull Distance on UIRefreshControl to Activate the Pull to Refresh Action?

Hey StackOverflow People, I've been trying to figure out this question for some time now but to no avail and I need some help. I have a UITableView close to the bottom of my app and there's not enough screen distance for the user to engage the…
Danchez
  • 1,266
  • 2
  • 13
  • 28
18
votes
6 answers

UIRefreshControl hidden / obscured by my UINavigationController's UINavigationBar

I'm attempting to use a UIRefreshControl inside my UITableViewController which itself is inside a UINavigationController, which has its hidesNavigationBar property set to NO (so the navigation bar is visible). The UIRefreshControl works, but is…
17
votes
3 answers

iOS UITableView Offset Refresh Control

I have a UITableView that is constrained to the superview. So the first cell is at the top of the superview. Which means on the iPhone X that first cell bleeds under the notch, and into the status bar area. Which is exactly right. I want the cell to…
Charlie Fish
  • 18,491
  • 19
  • 86
  • 179
16
votes
3 answers

How to add refresh control to collection view large titles navigation bar in iOS 11?

According to Apple the refresh control should be part of the large title navigation bar in iOS 11. The refresh control is part of the navigation bar (on pull to refresh) when I enabled the refresh control in my storyboard for a…
funkenstrahlen
  • 3,032
  • 2
  • 28
  • 40
16
votes
5 answers

UITableViewController refreshControl is glitchy when UITableViewController frame.height is small

I have a problem that stems from the fact that UITableViewController refreshControl is glitchy when the frame of the UITableViewController is below a certain height. As it stands, I have a UIViewController, and in it I have a ContainerView that…
David
  • 7,028
  • 10
  • 48
  • 95
16
votes
5 answers

UIRefreshControl stops spinning after making application inactive

I use UIRefreshControl in a UITableView: UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(refresh) forControlEvents:UIControlEventValueChanged]; self.refreshControl =…
alexey
  • 8,360
  • 14
  • 70
  • 102
16
votes
3 answers

UIRefreshControl Background Color

Is it possible to make the background of a UIRefreshControl grow as the control grows? I would like to have a colored background for the refresh control to match the top cell's background color. Changing the background color of the tableview is not…
Brent
  • 460
  • 1
  • 3
  • 12
15
votes
2 answers

iOS 11 refresh control + search bar = missing spinner when refreshing

I'm trying to use the standard UIRefreshControl and UISearchController on a UITableViewController. However it doesn't look like it does what it's supposed to. When refreshing, scrolling leaves the navigation bar with a big blank area, presumably…
Allen Zeng
  • 2,635
  • 2
  • 20
  • 31
1
2
3
32 33