Cartography 介绍
Cartography 是用来声明 Swift 中的 Auto Layout,无需输入任何 stringly 就可设置自己 Auto Layout
的约束声明。
如何使用
layout(view1, view2) { view1, view2 in view1.width == (view.superview!.width - 50) * 0.5 view2.width == view1.width - 50 view1.height == 40 view2.height == view1.height view1.centerX == view.superview!.centerX view2.centerX == view1.centerX view1.top >= view.superview!.top + 20 view2.top == view1.bottom + 20 }
介绍来自:http://www.iteye.com/news/29583
Cartography 官网
https://github.com/robb/Cartography
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。