title: ARC with CGColorRef
body: <p>I'm still getting used to ARC and the bridge casts.  I saw this in the docs about CGColor</p>
  
  <blockquote>
    <p>The Compiler Handles CF Objects Returned From Cocoa Methods The
    compiler understands Objective-C methods that return Core Foundation
    types follow the historical Cocoa naming conventions (see Advanced
    Memory Management Programming Guide). For example, the compiler knows
    that, in iOS, the CGColor returned by the CGColor method of UIColor is
    not owned. You must still use an appropriate type cast, as illustrated
    by this example:</p>
  </blockquote>
  
  <pre><code>NSMutableArray *colors = [NSMutableArray arrayWithObject:(id)[[UIColor darkGrayColor] CGColor]];
  [colors addObject:(id)[[UIColor lightGrayColor] CGColor]];
  </code></pre>
  
  <p>So in my code, I tried this:</p>
  
  <pre><code>gradientLayer.backgroundColor = (id)([UIColor clearColor].CGColor));
  </code></pre>
  
  <p>I got a compiler warning about ARC and needed to use a bridge cast.  I still don't understand why.  When I clicked on "Fix-It", it gave me this:</p>
  
  <pre><code>gradientLayer.backgroundColor = (__bridge CGColorRef)((__bridge id)([UIColor clearColor].CGColor));
  </code></pre>
  
  <p>Which I do not understand.  What does this mean?  Thanks!</p>