Aligning

Horizontally

alignHorizontally(avatar,name,followButton)

Vertically

alignVertically(title,subtitle,text)

Tops

alignTops(title,subtitle,text)

Bottoms

alignBottoms(title,subtitle,text)

Rights

alignRights(title,subtitle,text)

Lefts

alignLefts(title,subtitle,text)

Align the center of one view with another one :

alignCenter(view1, with: view2)

In the example above of a follow Cell, here is how the layout code would look like :

|-avatar-15-name-20-followButton-|
alignHorizontally(avatar,name,followButton)

But |-avatar-15-name-20-followButton-| actually returns the array of views!!! so we can write it in one single statement :

alignHorizontally(|-avatar-15-name-20-followButton-|)

Baselines

align(lastBaselines: label, label2, label3)
label.LastBaseline == label.LastBaseline + 24

🎉🎉🎉