Created
April 9, 2013 02:45
-
-
Save garrettmurray/5342519 to your computer and use it in GitHub Desktop.
Use a UIRefreshControl with a UIViewController that contains a tableView property.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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
Thank you this worked like charm, this is a swift version of your code