📅  最后修改于: 2022-03-11 15:00:58.141000             🧑  作者: Mango
extension UIImageView {
func setImageColor(color: UIColor) {
let templateImage = self.image?.withRenderingMode(.alwaysTemplate)
self.image = templateImage
self.tintColor = color
}
}