I am implementing UIRefreshControl
on a UITableView
to refresh the table's data. On other pull-to-refresh implementations, the refresh process does not begin until the user's finger is lifted while in the pull's refresh distance. UIRefreshControl does not immediately seem like it has this customization.
My UIRefreshControl init
code:
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
[refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
[self.tableView addSubview:refreshControl];
My refresh:
code is fairly basic:
- (void)refresh:(id)sender {
// Refresh code...
[sender endRefreshing];
}
How can I delay the refresh:
function until the user removes their finger from the pull?