Skip to content

Instantly share code, notes, and snippets.

@tkreuder
Created May 25, 2015 08:26
Show Gist options
  • Save tkreuder/f793d19c81756971bae1 to your computer and use it in GitHub Desktop.
Save tkreuder/f793d19c81756971bae1 to your computer and use it in GitHub Desktop.
override func reverseTransformedValue(value: AnyObject!) -> AnyObject {
let data = value as! NSData
var components:[CGFloat] = [CGFloat](count: 4, repeatedValue:0)
var length=sizeofValue(components)
data.getBytes(&components, length: length)
let color = UIColor(red: components[0],
green: components[1],
blue: components[2],
alpha: components[3])
return color
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment