mirror of https://github.com/SnapKit/SnapKit
Code Snippets!
This commit is contained in:
parent
9db0127854
commit
7cf9a9ff59
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDECodeSnippetCompletionPrefix</key>
|
||||||
|
<string>snp_make</string>
|
||||||
|
<key>IDECodeSnippetCompletionScopes</key>
|
||||||
|
<array>
|
||||||
|
<string>CodeBlock</string>
|
||||||
|
</array>
|
||||||
|
<key>IDECodeSnippetContents</key>
|
||||||
|
<string><#view#>.snp_makeConstraints { make in
|
||||||
|
<#code#>
|
||||||
|
}</string>
|
||||||
|
<key>IDECodeSnippetIdentifier</key>
|
||||||
|
<string>FF434629-7B96-4AB9-BD96-522275E7B106</string>
|
||||||
|
<key>IDECodeSnippetLanguage</key>
|
||||||
|
<string>Xcode.SourceCodeLanguage.Swift</string>
|
||||||
|
<key>IDECodeSnippetTitle</key>
|
||||||
|
<string>Snappy Constraint Make</string>
|
||||||
|
<key>IDECodeSnippetUserSnippet</key>
|
||||||
|
<true/>
|
||||||
|
<key>IDECodeSnippetVersion</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDECodeSnippetCompletionPrefix</key>
|
||||||
|
<string>snp_remake</string>
|
||||||
|
<key>IDECodeSnippetCompletionScopes</key>
|
||||||
|
<array>
|
||||||
|
<string>TopLevel</string>
|
||||||
|
</array>
|
||||||
|
<key>IDECodeSnippetContents</key>
|
||||||
|
<string><#view#>.snp_remakeConstraints { make in
|
||||||
|
<#code#>
|
||||||
|
}</string>
|
||||||
|
<key>IDECodeSnippetIdentifier</key>
|
||||||
|
<string>FD093546-D614-4311-82C3-E8FE842F62B1</string>
|
||||||
|
<key>IDECodeSnippetLanguage</key>
|
||||||
|
<string>Xcode.SourceCodeLanguage.Swift</string>
|
||||||
|
<key>IDECodeSnippetTitle</key>
|
||||||
|
<string>Snappy Constraint Remake</string>
|
||||||
|
<key>IDECodeSnippetUserSnippet</key>
|
||||||
|
<true/>
|
||||||
|
<key>IDECodeSnippetVersion</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDECodeSnippetCompletionPrefix</key>
|
||||||
|
<string>snp_update</string>
|
||||||
|
<key>IDECodeSnippetCompletionScopes</key>
|
||||||
|
<array>
|
||||||
|
<string>TopLevel</string>
|
||||||
|
</array>
|
||||||
|
<key>IDECodeSnippetContents</key>
|
||||||
|
<string><#view#>.snp_updateConstraints { make in
|
||||||
|
<#code#>
|
||||||
|
}</string>
|
||||||
|
<key>IDECodeSnippetIdentifier</key>
|
||||||
|
<string>EBC85411-DF71-4954-9393-628A1BED8BBE</string>
|
||||||
|
<key>IDECodeSnippetLanguage</key>
|
||||||
|
<string>Xcode.SourceCodeLanguage.Swift</string>
|
||||||
|
<key>IDECodeSnippetTitle</key>
|
||||||
|
<string>Snappy Constraint Update</string>
|
||||||
|
<key>IDECodeSnippetUserSnippet</key>
|
||||||
|
<true/>
|
||||||
|
<key>IDECodeSnippetVersion</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
10
README.md
10
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` -> `<view>.snp_makeConstraints { make in <code> }`
|
||||||
|
|
||||||
|
`snp_update` -> `<view>.snp_updateConstraints { make in <code> }`
|
||||||
|
|
||||||
|
`snp_remake` -> `<view>.snp_remakeConstraints { make in <code> }`
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
* Eye candy
|
* Eye candy
|
||||||
|
|
Loading…
Reference in New Issue