How can I change image tintColor

后端 未结 13 848
时光说笑
时光说笑 2020-12-13 00:04

I\'m receiving image from a server, then based on a color chosen by the user, the image color will be changed.

I tried the following :

_sketchImageVi         


        
13条回答
  •  粉色の甜心
    2020-12-13 00:40

    let image = UIImage(named: "i m a g e   n a m e")?.withRenderingMode(.alwaysTemplate)
    imageView.tintColor = UIColor.white // Change to require color 
    imageView.image = image
    

提交回复
热议问题