Last active
October 19, 2020 13:28
-
-
Save pogramos/f5622c47311ea7aaadfd8eff05419051 to your computer and use it in GitHub Desktop.
CustomButton - Variables
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
| override var isEnabled: Bool { | |
| didSet { | |
| updateBackground() | |
| } | |
| } | |
| var style: ButtonStyle { | |
| didSet { | |
| apply(style: style) | |
| } | |
| } | |
| init(style: ButtonStyle = .primary) { | |
| self.style = style | |
| super.init(frame: .zero) | |
| apply(style: style) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment