title: drawViewHierarchyInRect hangs when called with a timer
body: <p>Supposed to have this method to create UIView snapshot</p>
  
  <pre><code>+ (UIImage *)screenshotWithView:(UIView *)view {
      UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0f);
      if( [view respondsToSelector:@selector(drawViewHierarchyInRect:afterScreenUpdates:)] ) { // LP: iOS 7 only
          [view drawViewHierarchyInRect:view.bounds
                     afterScreenUpdates:[view superview]?NO:YES];
      } else {
          [view.layer renderInContext:UIGraphicsGetCurrentContext()];
      }
      UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
      UIGraphicsEndImageContext();
  
      return image;
  }
  </code></pre>
  
  <p>When executing this method in a time, let's say something like</p>
  
  <pre><code>runTimer = [NSTimer scheduledTimerWithTimeInterval: 1.0f/30
                                                  target:self
                                                selector:@selector(sendScreen)
                                                userInfo:nil
  
                                         repeats:repeat];
  </code></pre>
  
  <p>the app becomes slower and slower. The UI does not freeze, and the snapshot is taked, but performances dramatically decreases.</p>
  
  <p>That is exactly what Apple does not suggest here abuot the new UI methods for iOS7:</p>
  
  <p><a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW217" rel="nofollow">https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW217</a></p>
  
  <p>When using the classic</p>
  
  <pre><code> [view.layer renderInContext:UIGraphicsGetCurrentContext()];
  </code></pre>
  
  <p>everything works as expected, but of course we knew this already.</p>
  
  <p>No success when trying the</p>
  
  <pre><code>- (UIView *)snapshotViewAfterScreenUpdates:(BOOL)afterUpdates
  </code></pre>