Last active
June 29, 2016 20:52
-
-
Save pbonneville/0b194066869df689984cea356bb4ce02 to your computer and use it in GitHub Desktop.
Sample code for a basic computed value for Swift
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
// This code is designed to be dropped into Xcode snippets. Paste the code into an Xcode document | |
// and then drag it onto the Code Snippet library to create a snippet with prompts. | |
var <# variable name #>: <# variable type #> { | |
get { | |
return <# value to return #> | |
} | |
set { | |
// "newValue" is the value that was passed into this variable to be set and is automagically available to you | |
var <# value to set #> = newValue | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment