Nav apraksta

Robert Payne 2e4cebf41d Fix bug around view.snp.layoutConstraints being dealloc’d 9 gadi atpakaļ
CodeSnippets 51662d58bb Snap is now SnapKit 10 gadi atpakaļ
SnapKit.xcodeproj 2764642a2d Tweaks for OSX support 9 gadi atpakaļ
SnapKit.xcworkspace 51662d58bb Snap is now SnapKit 10 gadi atpakaļ
Source 2e4cebf41d Fix bug around view.snp.layoutConstraints being dealloc’d 9 gadi atpakaļ
Tests 2764642a2d Tweaks for OSX support 9 gadi atpakaļ
.gitignore 73e038f3ab Updated gitignore 10 gadi atpakaļ
.travis.yml 1754ffd536 Update Travis.ci 10 gadi atpakaļ
CHANGELOG.md ca34ad4252 Updated changelog 9 gadi atpakaļ
CONTRIBUTING.md 10e9c37f38 Added contributing document 10 gadi atpakaļ
LICENSE 51662d58bb Snap is now SnapKit 10 gadi atpakaļ
Package.swift c4dbfd9d78 Update license file on Package.swift 10 gadi atpakaļ
README.md 6e8bdde05e Updated Readme 9 gadi atpakaļ
SnapKit.podspec 2f803657af Update podspec 9 gadi atpakaļ

README.md

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

Build Status Cocoapods Compatible Carthage compatible

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.