From 7cf9a9ff593b0599a770830919fdbebddda3308e Mon Sep 17 00:00:00 2001 From: Ryan Maxwell Date: Fri, 5 Dec 2014 14:36:41 +1300 Subject: [PATCH] Code Snippets! --- .../Snappy Constraint Make.codesnippet | 26 +++++++++++++++++++ .../Snappy Constraint Remake.codesnippet | 26 +++++++++++++++++++ .../Snappy Constraint Update.codesnippet | 26 +++++++++++++++++++ README.md | 10 +++++++ 4 files changed, 88 insertions(+) create mode 100644 CodeSnippets/Snappy Constraint Make.codesnippet create mode 100644 CodeSnippets/Snappy Constraint Remake.codesnippet create mode 100644 CodeSnippets/Snappy Constraint Update.codesnippet diff --git a/CodeSnippets/Snappy Constraint Make.codesnippet b/CodeSnippets/Snappy Constraint Make.codesnippet new file mode 100644 index 0000000..35bf0b8 --- /dev/null +++ b/CodeSnippets/Snappy Constraint Make.codesnippet @@ -0,0 +1,26 @@ + + + + + IDECodeSnippetCompletionPrefix + snp_make + IDECodeSnippetCompletionScopes + + CodeBlock + + IDECodeSnippetContents + <#view#>.snp_makeConstraints { make in + <#code#> +} + IDECodeSnippetIdentifier + FF434629-7B96-4AB9-BD96-522275E7B106 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Swift + IDECodeSnippetTitle + Snappy Constraint Make + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + diff --git a/CodeSnippets/Snappy Constraint Remake.codesnippet b/CodeSnippets/Snappy Constraint Remake.codesnippet new file mode 100644 index 0000000..3b28109 --- /dev/null +++ b/CodeSnippets/Snappy Constraint Remake.codesnippet @@ -0,0 +1,26 @@ + + + + + IDECodeSnippetCompletionPrefix + snp_remake + IDECodeSnippetCompletionScopes + + TopLevel + + IDECodeSnippetContents + <#view#>.snp_remakeConstraints { make in + <#code#> +} + IDECodeSnippetIdentifier + FD093546-D614-4311-82C3-E8FE842F62B1 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Swift + IDECodeSnippetTitle + Snappy Constraint Remake + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 0 + + diff --git a/CodeSnippets/Snappy Constraint Update.codesnippet b/CodeSnippets/Snappy Constraint Update.codesnippet new file mode 100644 index 0000000..b86745d --- /dev/null +++ b/CodeSnippets/Snappy Constraint Update.codesnippet @@ -0,0 +1,26 @@ + + + + + IDECodeSnippetCompletionPrefix + snp_update + IDECodeSnippetCompletionScopes + + TopLevel + + IDECodeSnippetContents + <#view#>.snp_updateConstraints { make in + <#code#> +} + IDECodeSnippetIdentifier + EBC85411-DF71-4954-9393-628A1BED8BBE + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Swift + IDECodeSnippetTitle + Snappy Constraint Update + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 0 + + diff --git a/README.md b/README.md index 2d7febf..5887912 100644 --- a/README.md +++ b/README.md @@ -274,6 +274,16 @@ func changeButtonPosition() { } ``` +## Code Snippets + +Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your snappy closures at lightning speed! + +`snp_make` -> `.snp_makeConstraints { make in }` + +`snp_update` -> `.snp_updateConstraints { make in }` + +`snp_remake` -> `.snp_remakeConstraints { make in }` + ## TODO * Eye candy