index.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. layout: default
  3. id: home
  4. ---
  5. <div class="row">
  6. <div id="info" class="small-12 large-6 columns">
  7. <h4>SnapKit is a DSL to make Auto Layout easy on both iOS&nbsp;and&nbsp;OS&nbsp;X.</h4>
  8. <ul>
  9. <li><strong>Simple &amp; Expressive</strong> chaining DSL allows building constraints with minimal amounts of code while ensuring they are easy to read and understand.</li>
  10. <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>
  11. <li><strong>Compatible</strong> for both iOS and OS X apps installable through Cocoapods or Carthage.</li>
  12. <li><strong>Free</strong> to use in all projects and licensed under the flexible MIT&nbsp;license.</li>
  13. </ul>
  14. </div>
  15. <div id="example" class="small-12 large-6 columns">
  16. {% highlight swift %}
  17. let box = UIView()
  18. let container = UIView()
  19. container.addSubview(box)
  20. box.snp_makeConstraints { (make) -> Void in
  21. make.size.equalTo(50)
  22. make.center.equalTo(container)
  23. }
  24. {% endhighlight %}
  25. <h6>makes</h6>
  26. <div class="box">
  27. <span>container</span>
  28. <div class="box">
  29. <span>box</span>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <button id="get-started-btn"><a href="/docs">Getting Started &amp; Docs &rarr;</a></button>