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

Dave Ronsom picture Dave Ronsom · Dec 29, 2012 · Viewed 11.8k times · Source

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.

Answer

Dave DeLong picture Dave DeLong · Jan 1, 2013

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];