[![CI Status](https://img.shields.io/travis/Michalis Karagiorgos/Anchorz.svg?style=flat)](https://travis-ci.org/Michalis Karagiorgos/Anchorz)
To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 9.0+
- Swift 4.0+
Anchorz is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Anchorz'
import UIKit
import Anchorz
class ViewController: UIViewController {
let redView: UIView = {
let view = UIView()
view.backgroundColor = .red
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(redView)
redView.constraint(
.top(view.topAnchor, constant: 10),
.bottom(view.bottomAnchor, constant: 10),
.leading(view.leadingAnchor, constant: 10),
.trailing(view.trailingAnchor, constant: 10)
)
}
}
Michalis Karagiorgos, [email protected]
Anchorz is available under the MIT license. See the LICENSE file for more info.