| 1234567891011121314151617181920212223242526272829303132333435363738 |
- ---
- layout: default
- id: home
- ---
- <div class="row">
- <div id="info" class="small-12 large-6 columns">
- <h4>SnapKit is a DSL to make Auto Layout easy on both iOS and OS X.</h4>
- <ul>
- <li><strong>Simple & Expressive</strong> chaining DSL allows building constraints with minimal amounts of code while ensuring they are easy to read and understand.</li>
- <li><strong>Type Safe</strong> by design to reduce programmer error and keep invalid constraints from being created in the first place for maximized productivity.</li>
- <li><strong>Compatible</strong> for both iOS and OS X apps installable through Cocoapods or Carthage.</li>
- <li><strong>Free</strong> to use in all projects and licensed under the flexible MIT license.</li>
- </ul>
- </div>
- <div id="example" class="small-12 large-6 columns">
- {% highlight swift %}
- let box = UIView()
- let container = UIView()
- container.addSubview(box)
- box.snp.makeConstraints { (make) -> Void in
- make.size.equalTo(50)
- make.center.equalTo(container)
- }
- {% endhighlight %}
- <h6>makes</h6>
- <div class="box">
- <span>container</span>
- <div class="box">
- <span>box</span>
- </div>
- </div>
- </div>
- </div>
- <button id="get-started-btn"><a href="/docs">Getting Started & Docs →</a></button>
|