Skip to content

Instantly share code, notes, and snippets.

@nafferro
Created June 13, 2016 09:43
Show Gist options
  • Select an option

  • Save nafferro/9b6b0264449362954e23c0398ca8bf7e to your computer and use it in GitHub Desktop.

Select an option

Save nafferro/9b6b0264449362954e23c0398ca8bf7e to your computer and use it in GitHub Desktop.
How to change UIImage color
let origImage = UIImage(named: "imageName");
let tintedImage = origImage?.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)
btn.setImage(tintedImage, forState: .Normal)
btn.tintColor = UIColor.redColor()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment