Skip to content

Instantly share code, notes, and snippets.

@garrettmurray
Created April 9, 2013 02:45

Revisions

  1. garrettmurray created this gist Apr 9, 2013.
    11 changes: 11 additions & 0 deletions gistfile1.m
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    // 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];