title: UIRefreshControl with UICollectionView in iOS7
body: <p>In my application I use refresh control with collection view.</p>
  
  <pre><code>UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:[UIScreen mainScreen].bounds];
  collectionView.alwaysBounceVertical = YES;
  ...
  [self.view addSubview:collectionView];
  
  UIRefreshControl *refreshControl = [UIRefreshControl new];
  [collectionView addSubview:refreshControl];
  </code></pre>
  
  <p>iOS7 has some nasty bug that when you pull collection view down and don't release your finger when refreshing begins, vertical <code>contentOffset</code> shifts for 20-30 points down which results in ugly scroll jump.</p>
  
  <p>Tables have this problem too if you use them with refresh control outside of <code>UITableViewController</code>. But for them it could be easily solved by assigning your <code>UIRefreshControl</code> instance to <code>UITableView</code>'s private property called <code>_refreshControl</code>:</p>
  
  <pre><code>@interface UITableView ()
  - (void)_setRefreshControl:(UIRefreshControl *)refreshControl;
  @end
  
  ...
  
  UITableView *tableView = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds];
  [self.view addSubview:tableView];
  
  UIRefreshControl *refreshControl = [UIRefreshControl new];
  [tableView addSubview:refreshControl];
  [tableView _setRefreshControl:refreshControl];
  </code></pre>
  
  <p>But <code>UICollectionView</code> does not have such property so there must be some way to deal with it manually.</p>