Home

Awesome

logo

<p align="left"> <img src="https://img.shields.io/badge/platforms-iOS%2C%20tvOS%2C%20macOS-lightgrey.svg?colorA=28a745"> </p>

The best way to create constraints in code.

To give you a taste of what the semantic APIs look like, here is an example:

view.anchors.edges.pin(insets: 20, alignment: .center)
<img src="https://user-images.githubusercontent.com/1567433/84931836-5cb7e400-b0a1-11ea-8342-ce76b151fcad.png" alt="pin edges with center alignment" width="331px"/>

Documentation

The documentation for Align is created using DocC and covers all of its APIs in a clear visual way. There is also a cheat sheet available that lists all of the available APIs.

<a href="https://kean-docs.github.io/align/documentation/align/"> <img alt="Screen Shot 2022-07-13 at 10 08 57 AM" src="https://user-images.githubusercontent.com/1567433/178755429-9420d25e-dad1-4e61-9a22-04139c5746e6.png" width="858px"> </a>

Requirements

AlignSwiftXcodePlatforms
Align 3.2Swift 5.8Xcode 14.3iOS 13.0, tvOS 13.0, macOS 10.15
Align 3.0Swift 5.6Xcode 13.3iOS 12.0, tvOS 12.0, macOS 10.14
Align 2.0Swift 5.1Xcode 11.0iOS 11.0, tvOS 11.0, macOS 10.13

Why Align

Align strives for clarity and simplicity by following Swift API Design Guidelines. Although most of the APIs are compact, it is a non-goal to enable the most concise syntax possible.

Align is for someone who: