Is there a way to change the color of a UIImage when drawing it (like changing the tint color for a button image)? This is for IOS8 + Swift.
see below code where I would like to change the color of imageX
var imageY : UIImage = UIImage(named: "y.png")!
UIGraphicsBeginImageContext( imageY.size )
imageY.drawInRect(CGRect(origin: CGPointMake(0.0, 0.0), size: imageY.size))
var imageX : UIImage = UIImage(named: "x.png")!
imageX.drawInRect(CGRect(x: 10, y: 10, width: CGFloat(44), height: CGFloat(44)))
var newImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext();