Skip to content

Instantly share code, notes, and snippets.

@morganwilde
Created August 17, 2015 08:40
Show Gist options
  • Save morganwilde/1929e6a5c4c3e9758b01 to your computer and use it in GitHub Desktop.
Save morganwilde/1929e6a5c4c3e9758b01 to your computer and use it in GitHub Desktop.
let components = UnsafeMutablePointer<CGFloat>.alloc(4)
UIColor.redColor().getRed(&components[0], green: &components[1], blue: &components[2], alpha: &components[3])
CGContextSetFillColor(ctx, components)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment