I'm using an instance of UIRefreshControl
to reload the data in a UITableView
.
If I run the app on any phone except the iPhone 6+, the refresh-control will disappear after the data refresh has finished.
However, if I run the app, on the iPhone 6+, the refresh-control will stay visible after the user has pulled down on the table-view to refresh the data. Below is a screenshot of the refresh-control visible behind elements of the table-view:
This behavior does not occur on any other phone except for the 6+. Below is the code for refreshing the table-view data, which is inside of viewWillAppear
:
if (self.refreshControl == nil) {
UIRefreshControl *refreshControl = [UIRefreshControl new];
refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:@" "];
refreshControl.tintColor = [UIColor refreshColor];
[refreshControl addTarget:self action:@selector(refreshTableView:) forControlEvents:UIControlEventValueChanged];
self.refreshControl = refreshControl;
self.tableView.backgroundView.layer.zPosition -= 1;
}
Does anyone know why the refresh control will stay visible when refreshing a table-view on the 6+?