Skip to content

Instantly share code, notes, and snippets.

@twittemb
Created March 19, 2020 20:45
Show Gist options
  • Save twittemb/9c00d1672bad6a0162f8256f5fe5dad0 to your computer and use it in GitHub Desktop.
Save twittemb/9c00d1672bad6a0162f8256f5fe5dad0 to your computer and use it in GitHub Desktop.
func render(state: State) {
switch state {
case .increasing(let value):
self.counterLabel.text = "\(value)"
self.counterLabel.textColor = .green
case .decreasing(let value):
self.counterLabel.text = "\(value)"
self.counterLabel.textColor = .red
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment