mirror of https://github.com/SnapKit/SnapKit
68bebfd105
This updates the code to work under both 2.2 and 2.3 while developers handle their transition period up to Swift 3. The project file is also updated to indicate the last migration, and the version of swift. The version instructs Xcode 8 which internal toolchain is to be used. |
||
---|---|---|
CodeSnippets | ||
Example-iOS | ||
SnapKit.xcodeproj | ||
SnapKit.xcworkspace | ||
Source | ||
Tests | ||
.gitignore | ||
.travis.yml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
ISSUE_TEMPLATE.md | ||
LICENSE | ||
Package.swift | ||
README.md | ||
SnapKit.podspec |
README.md
SnapKit is a DSL to make Auto Layout easy on both iOS and OS X.
import SnapKit
class MyViewController: UIViewController {
lazy var box = UIView()
override func viewDidLoad() {
super.viewDidLoad()
self.view.addSubview(box)
box.snp_makeConstraints { make in
make.width.height.equalTo(50)
make.center.equalTo(self.view)
}
}
}
Resources
License
MIT license. See the LICENSE
file for details.