A collection of useful Xcode snippets for working with Swift.
Installing the .codesnippet
files is easy; just place them in ~/Library/Developer/Xcode/UserData/CodeSnippets/
and Xcode will recognize them. You can view all code snippets by opening the right-hand Utilities pane in Xcode and then selecting the "Show the Code Snippet library" button (the curly braces) at the bottom.
When defining a code snippet, you can use <#PlaceholderText#>
to generate placeholders. You will then be able to tab between these placeholders after placing the snippet.
Once these code snippets are installed, you can type the following commands to bring up code snippets in autocomplete.
doc
: Generates SwiftLint compatible documentation for a single method. Options include a number of parameter/return combinations.
© 2016 Float. Shared under an MIT license. See license.md for details.