标签: ios swift uiimageview uiimage tintcolor
我尝试了以下代码,但没有用。
var colorImg = UIImage(named: "myimg") maskImageView.image = maskImageView.image?.withRenderingMode(.alwaysTemplate) maskImageView.tintColor = UIColor(patternImage: colorImg)