mirror of https://github.com/SnapKit/SnapKit
commit
8991444481
|
@ -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>
|
10
README.md
10
README.md
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Snappy is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Snappy has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable. Snappy supports both iOS and OS X.
|
Snappy is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Snappy has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable. Snappy supports both iOS and OS X.
|
||||||
|
|
||||||
> Snappy uses some Swift only features like function overloading it cannot be used from Objective-C. Because of this we’ve chosen to swap prefixes from Masonry’s `mas_` to `snp_` so you can use both Masonry and Snappy in the same project.
|
> Snappy uses some Swift-only features like function overloading, so it cannot be used from Objective-C. Because of this we’ve chosen to swap prefixes from Masonry’s `mas_` to `snp_` so you can use both Masonry and Snappy in the same project.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
@ -274,6 +274,14 @@ 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_remake` -> `<view>.snp_remakeConstraints { make in <code> }`
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
* Eye candy
|
* Eye candy
|
||||||
|
|
Loading…
Reference in New Issue