Last active
November 5, 2016 12:14
-
-
Save n3tr/b7bf2542c626562a297d71a5fad58ee9 to your computer and use it in GitHub Desktop.
dynamic and action handler
This file contains 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
// ViewController.swift | |
class ViewController: NSViewController { | |
// (1) | |
dynamic var currentCounter = 0 | |
// ... | |
// (2) | |
func increaseCounter() { | |
currentCounter += 1 | |
} | |
func decreaseCounter() { | |
currentCounter -= 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment