Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rafiki270 authored Jun 1, 2018
1 parent 00fd11e commit b2edaee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gridView.add(subview: albumCover, space: 5) { make in
}

// Add album title label, stretching (12px padding) from the album cover image to the end of the grid view
gridView.add(subview: albumTitleLabel, from: albumCoverRelation, space: .last, padding: .left(12))
gridView.add(subview: albumTitleLabel, from: .relation(albumCover, margin: 12), space: .last)

// Reusable position for the remaining two album labels. iPhones in portrait will take the rest of the screen,
// on bigger devices or in landscape mode these labels finish two columns from the end of the grid view (.reversed(2)).
Expand Down Expand Up @@ -118,6 +118,7 @@ gridView.config.automaticVerticalSizing = true

## Positioning

### Padding
Available paddings are:
```swift
/// None
Expand All @@ -139,6 +140,8 @@ Available paddings are:
.full(top: CGFloat, left: CGFloat, right: CGFloat)
```

### Vertical positioning

For vertical positioning you set a pixel value directly (`Int` or `Float`, later will be converted to `.exactly(fromTop: CGFloat)`) or use one of the following values:

```swift
Expand All @@ -164,6 +167,8 @@ For vertical positioning you set a pixel value directly (`Int` or `Float`, later
.custom(((_ traitCollection: UITraitCollection) -> Vertical))
```

### Horizontal positioning

For horizontal positioning you can use an integer (`Int`) directly to specify the exact column or use one of the following methods:

```swift
Expand Down

0 comments on commit b2edaee

Please sign in to comment.