Skip to content

Instantly share code, notes, and snippets.

@SatoTakeshiX
Created December 7, 2016 01:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SatoTakeshiX/02750aa78d6d51c828e7ad29f38db31b to your computer and use it in GitHub Desktop.
Save SatoTakeshiX/02750aa78d6d51c828e7ad29f38db31b to your computer and use it in GitHub Desktop.
UIImageViewの画像を無理やり色を変える方法。これを使えばデザイナーに頼まなくても色変更可能 #CodePiece
@IBOutlet weak var imageView: UIImageView! {
didSet {
imageView.image = UIImage.init(named: "photo1")?.withRenderingMode(.alwaysTemplate)
imageView.tintColor = UIColor.white
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment