Created
September 25, 2020 16:25
-
-
Save giovani-pereira-ifood/8fffe146532775cd8b46e1e8de52efb4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IconView: UIView { | |
/// Change the icon being displayed | |
var icon: Icon { | |
didSet { | |
label.text = icon.rawValue | |
} | |
} | |
/// Change the color of the icon being displayed | |
var color: UIColor { | |
didSet { | |
label.textColor = color | |
} | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment