Constraints
示例
// pinning and adding subviews
backgroundView.constraint(on: view)
.pin()
blueRect.constraint(on: view)
.height(c: 40)
.safePin(.top, .left, .bottom)
centerSquare.constraint(on: view)
.center()
.square(to: 100)
安装
Constraints 可以通过 CocoaPods 获取。要安装它,只需将以下行添加到您的 Podfile 中
pod 'Constraints'
作者
Serhiy Vysotskiy
许可协议
Constraints 在 MIT 许可协议下可用。有关更多信息,请参阅 LICENSE 文件。