title: UITableView pull to refresh causing flickering. How to prevent it?
body: <p>I'm doing that pull-down-to-refresh thing. In scrollViewDidEndDecelerating I check if the offset is past a certain point and in scrollViewDidEndDragging I set the contentInset so as to keep the pulled-down section visible. </p>
  
  <p>However, this results in flickering, probably due to the contentInset being reset during scrolling animation. I thought I might be able to prevent this by setting the targetContentOffset in scrollViewWillEndDragging, but it doesn't seem to do the trick.  </p>
  
  <pre><code> - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate 
  {
  
       if (scrollView.contentOffset.y &lt; -kRefreshViewDelta) 
       {
           self.tableView.contentInset = UIEdgeInsetsMake(kRefreshViewHeight, 0.0f, 0.0f, 0.0f);
  
       }
  }
  
  - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
   {
       if (scrollView.contentOffset.y  &lt; -kRefreshViewDelta) 
       {
            targetContentOffset-&gt;y = kRefreshViewHeight ;
       }
   }
  </code></pre>