title: cocoa: what's the different of CATransaction and NSAnimationContext
body: <p>I can animately move a layer-hosing view using code:</p>
  
  <pre><code>[CATransaction setAnimationDuration:2];
  self.imageLayer.position = CGPointMake(0, 0);
  </code></pre>
  
  <p>and I can do it by following code as well:</p>
  
  <pre><code> [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
      [context setDuration:2];
      self.imageLayer.position = CGPointMake(0, 0);
  } completionHandler:nil];
  </code></pre>
  
  <p>I want to know what's the difference between CATransaction and NSAnimationContext, which one I should use to animate view? why can I set the duration in NSAnimationContext and CATransaction?</p>