Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 869 Bytes

README.md

File metadata and controls

36 lines (23 loc) · 869 Bytes

SnapKit is a DSL to make Auto Layout easy on both iOS and OS X.

Build Status

SnapKit does build just fine, Travis.ci doesn't support Swift 1.2 yet so this will show as failing until it is supported.

import SnapKit

class MyViewController: UIViewController {

    lazy var box = UIView()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.view.addSubview(box)
        box.snp_makeConstraints { (make) -> Void in
           make.width.height.equalTo(50)
           make.center.equalTo(self.view)
        }
    }

}

Resources

License

MIT license. See the LICENSE file for details.