I've seen quite a few problems with UIRefreshControl, and I'm having a problem as well with my UITableViewController. The problem occurs so randomly and henceforth I cannot figure out why or how it happens.
The problem is that sometimes when you scroll down on the tableView, the UIRefreshControl appears in the wrong place, and what seems like above/on top of the tableView itself. I'm attaching a screenshot of what the problem looks like, and also my code used to add the UIRefreshControl and it's refreshing method as well.
I appreciate any help offered!
- (void)viewDidLoad
{
self.refreshControl = [[UIRefreshControl alloc] init];
[self.refreshControl addTarget:self action:@selector(refreshing:) forControlEvents:UIControlEventValueChanged];
[self.tableView addSubview:self.refreshControl];
self.tableView.tableFooterView = [[UIView alloc] init];
}
- (void)refreshing:(UIRefreshControl*)refreshControl
{
[refreshControl beginRefreshing];
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
[refreshControl endRefreshing];
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}