title: What does __bridge mean in objective c?
body: <p>I am following a tutorial in Core Graphics and I came across the code __bridge. I looked into it and saw that it had to do with ARC but I am confused on what it does. Could someone explain what it does in this context?</p>
  
  <pre><code>    void drawLinearGradient(CGContextRef context, CGRect rect, CGColorRef startColor, CGColorRef endColor)
  {
      CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
      CGFloat locations[] = { 0.0, 1.0 };
  
      NSArray *colors = @[(__bridge id) startColor, (__bridge id) endColor];
  
      CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef) colors, locations);
  
  }
  </code></pre>