onevcat / APNGKit

High performance and delightful way to play with APNG format in iOS.
MIT License
2.21k stars 201 forks source link

How to tint a APNG Image? #108

Open StefaniOSApps opened 3 years ago

StefaniOSApps commented 3 years ago

I would like to tint a Image like

let imageView = UIImageView()
imageView.image = UIImage(named: "custom-icon")?.withRenderingMode(.alwaysTemplate)
imageView.tintColor = .red

How can I do that with APNG?

let imageView = APNGImageView()
imageView.image = APNGImage(named: "custom-apng-icon", progressive: true)
imageView.tintColor = .red

..but it does not work

onevcat commented 3 years ago

APNGKit v2 was just released but it still renders the content directly on layer, so this is not supported now. But it should be easy enough to support and I think it is quite useful.

Added to the to-do list for v2. Stay tuned.