Skip to content

Instantly share code, notes, and snippets.

@mavencode01
Forked from garrettmurray/gist:5342519
Last active August 29, 2015 14:17
Show Gist options
  • Save mavencode01/7ef6f3dd0f6ecce96e6f to your computer and use it in GitHub Desktop.
Save mavencode01/7ef6f3dd0f6ecce96e6f to your computer and use it in GitHub Desktop.
// Set up the UIRefreshControl.
self.refreshControl = [[UIRefreshControl alloc] init];
[self.refreshControl addTarget:self
action:@selector(refreshInvoked:forState:)
forControlEvents:UIControlEventValueChanged];
// Create a UITableViewController so we can use a UIRefreshControl.
UITableViewController *tvc = [[UITableViewController alloc] initWithStyle:self.tableView.style];
tvc.tableView = self.tableView;
tvc.refreshControl = self.refreshControl;
[self addChildViewController:tvc];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment