Search code examples
ios6uitableviewuirefreshcontrol

How do I programmatically slide the UITableView down to reveal the underlying UIRefreshControl


How can I reveal the UIRefreshControl when I update the table programmatically? Using [self.refreshControl beginRefreshing] make the spinner animate but does not reveal it.


Solution

  • You'll have to manually change the contentOffset of your UITableView yourself. Be sure to account for the contentInset.top. It should be something as simple as:

    CGPoint newOffset = CGPointMake(0, -[myTableView contentInset].top);
    [myTableView setContentOffset:newOffset animated:YES];