title: Core Animation Transition with Swift
body: <p>Apple documentation (<a href="https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/AdvancedAnimationTricks/AdvancedAnimationTricks.html" rel="noreferrer">https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/AdvancedAnimationTricks/AdvancedAnimationTricks.html</a>) have this sample:</p>
  
  <pre><code>CATransition* transition = [CATransition animation];
  ...
  </code></pre>
  
  <p>But when I did it in Swift:</p>
  
  <pre><code>    let transition = CATransition.animation()
  </code></pre>
  
  <p>I got an error "animation()' is unavailable: use object construction 'CAAnimation()'" - is this deprecated or? If yes, what's the new way of doing transition?</p>