Snippets Collections
extension UIImageView {
  func setImageColor(color: UIColor) {
    let templateImage = self.image?.withRenderingMode(.alwaysTemplate)
    self.image = templateImage
    self.tintColor = color
  }
}
star

Tue May 31 2022 05:47:57 GMT+0000 (Coordinated Universal Time)

#ios #swift #image #imagecolor #imagecolour #changeimagecolour

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension