How can I change image tintColor

后端 未结 13 761
时光说笑
时光说笑 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:35

    One thing you can do is, just add your images to Assets folder in XCode and then change the rendering mode to Template Image, so whenever you change the tint color of UIImageView, it will automatically makes change to image.

    Check this link out -> https://www.google.co.in/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwiM0YXO0ejTAhUIQ48KHfGpBpgQjRwIBw&url=https%3A%2F%2Fkrakendev.io%2Fblog%2F4-xcode-asset-catalog-secrets-you-need-to-know&psig=AFQjCNGnAzVn92pCqM8612o1R0J9q1y7cw&ust=1494619445516498

提交回复
热议问题