Skip to content
This repository was archived by the owner on Dec 27, 2020. It is now read-only.

Commit 72ef4a4

Browse files
authored
Update README.md
1 parent b45139e commit 72ef4a4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,24 @@ SwiftUI Grid view layout with auto-sizing items and flexible column count.
77
- Swift 5+
88
- iOS 13+
99
- macOS 10.15+
10+
11+
## Examples
12+
13+
### Simple grid
14+
```swift
15+
Grid(0...100) {
16+
Text("\($0)")
17+
}
18+
```
19+
20+
### Grid with minimum item width and fixed item height.
21+
```swift
22+
Grid(self.planets, minimumItemWidth: 320, spacing: 16) {
23+
PlanetView(planet: $0)
24+
.frame(height: 400)
25+
.onTapGesture {
26+
print("Selection:", $0)
27+
}
28+
}
29+
.edgesIgnoringSafeArea(.all)
30+
```

0 commit comments

Comments
 (0)