title: How do I return an Unmanaged<CGColor>! in Swift
body: <p>I'm using Lottie (animation framework) and one of the delegates I'm trying to use is expecting me to return an <code>Unmanaged&lt;CGColor&gt;!</code></p>
  
  <p>This is the definition:</p>
  
  <pre><code>color(forFrame currentFrame: CGFloat, startKeyframe: CGFloat, endKeyframe: CGFloat, interpolatedProgress: CGFloat, start startColor: CGColor!, end endColor: CGColor!, currentColor interpolatedColor: CGColor!) -&gt; Unmanaged&lt;CGColor&gt;!
  </code></pre>
  
  <p>If I just try to return <code>UIColor.white.cgColor</code> I get an error that says</p>
  
  <p><code>Cannot convert return expression of type 'CGColor' to return type 'Unmanaged&lt;CGColor&gt;!'</code></p>
  
  <p>I already tried going through their documentation but their example only shows to use it like this:</p>
  
  <pre><code>let colorBlock = LOTColorBlockCallback { (currentFrame, startKeyFrame, endKeyFrame, interpolatedProgress, startColor, endColor, interpolatedColor) -&gt; Unmanaged&lt;CGColor&gt; in
      return aColor
  }
  </code></pre>
  
  <p>So how can I return the proper type?</p>
  
  <p>Thanks</p>