Using Cartography, you can set up your Auto Layout constraints in declarative code and without any stringly typing! Call the constrain* function with your UIView or NSView instances as well as a closure in which you declare the constraints between the different attributes of your views. For every view on the left hand side of an equality or inequality operator, Cartography will automatically set its translatesAutoresizingMaskIntoConstraints property to false. If the view is not controlled by you–for example if it belongs to a Apple-provided UIViewController class–you should take appropriate care when declaring its constraints. You can capture multiple constraints in a group to then replace them with new constraints at a later point. Cartography supports all built-in attributes as of iOS 8 and OS X 10.9.
Features
- Supports convenient compound attributes that allow you to assign multiple attributes at once
- Set up your Auto Layout constraints in declarative code and without any stringly typing!
- Integrate Cartography into your Xcode project using CocoaPods
- You can capture multiple constraints in a group
- Supports all built-in attributes as of iOS 8 and OS X 10.9
- Distribute multiple views, either horizontally or vertically