Closed matt-matt1 closed 6 years ago
You can either render the image with colors provided
e.g. blue user icon
imageView.image = Awesome.solid.user.asImage(size: 64.0, color: .blue, backgroundColor: .clear)
or if you want to use the .tintColor
of property of UIImageView you can
imageView.tintColor = .blue
imageView.image = Awesome.solid.user.asImage(size: 64.0).withRenderingMode(.alwaysTemplate)
Then the color of the image will change when applying a new tintColor
In my past projects, I used Font-Awesome-Icons-Version-4~. With this framework I can easily use the ver.5~ icons. Thanks - Good work. I am following an old tutorial (because I want to use a similar feature). He uses .png images (with UIImage(named: ...)). However I using
Awesome.~.asImage(size: ~)
and thus don't need to use UIImage. (By using it's convince method, I can specify a color.) He lists many icons and the selected one's color changes. How can I replicate this? (-.tintColor dosen't work). (-.backgroundColor works, but I don't want this.)