A compact but full-featured Auto Layout DSL for Swift.
- Mortar does not use blocks/closures like SnapKit or Cartography. These are distracting and ugly when coding constraints for controllers with many views.
- Mortar is an attempt to get away from chaining methods like SnapKit does. Chained methods are good for providing semantic meaning to the line of code, but they are hard to parse quickly when you come back to your constraint section later.
- Mortar supports multi-constraint macro properties (like m_edges, m_frame, m_size, etc). SwiftAutoLayout and other operator-based DSLs don't seem to have support for these in a concise form. Properties are prefixed with m_ to reduce potential for conflict with other View extensions.
- Mortar supports implicit property matching (other frameworks require declared properties on both sides of the statement.)
- Mortar supports implicit tuple processing (you don't need to call out a tuple as a specific element like CGRect or CGSize).
- Mortar supports multi-view alignment/constraints in a single line.