How to add Snapkit in xcode manually without using cocoapods or carthage ?
Download project from repo or you can download only source file.
Then drag and drop that source file into your project.
And you are good to go.
Check example code which is given into their repo.
import UIKit
class ViewController: 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)
}
}
}
And its running without and errors:
Note: You don't need to import SnapKit
if you are adding it manually.
Check complete project HERE.