title: Using UIRefreshControl
body: <p>Currently, I have an application that is using <code>UIRefreshControl</code>.</p>
  
  <p>I am having some issues though... </p>
  
  <p>Heres my code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      self.searchDisplayController.delegate = self;
      UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
      [refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
      [self.rearTableView addSubview:refreshControl];
  }
  
  
  - (void)refresh:(UIRefreshControl *)refreshControl {
      [refreshControl beginRefreshing];
      [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(endRefresh:) userInfo:nil repeats:NO];
  }
  
  - (void)endRefresh:(UIRefreshControl *)refresh
  {
      [refresh endRefreshing];
  }
  </code></pre>
  
  <p>Pulling the tableview does initialize the <code>timer</code> but the <code>2</code> seconds are up... my app <code>crashes</code> and sends this message:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFTimer endRefreshing]: unrecognized selector sent to instance 0x9c093c0'
  </code></pre>
  
  <p>I am confused :(</p>