Skip to content

Instantly share code, notes, and snippets.

@brunomunizaf
Last active November 20, 2020 04:45
Show Gist options
  • Save brunomunizaf/a7f7e7d86f95f627e47ebe4ccd0aabe6 to your computer and use it in GitHub Desktop.
Save brunomunizaf/a7f7e7d86f95f627e47ebe4ccd0aabe6 to your computer and use it in GitHub Desktop.
final class ViewModel {
let countBox: Box<Int> = Box(0)
@objc func increment() {
countBox.value += 1
}
@objc func decrement() {
countBox.value -= 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment