Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @IBDesignable
- class ColoredImageView: UIImageView {
- @IBInspectable
- var imageColor: UIColor {
- set {
- tintColor = newValue
- let templateImage = image?.withRenderingMode(.alwaysTemplate)
- image = templateImage
- }
- get { return tintColor }
- }
- }
Add Comment
Please, Sign In to add comment