https://github.com/bionelabs/grid
Make views easy by Autolayout Swift
https://github.com/bionelabs/grid
Last synced: 2 months ago
JSON representation
Make views easy by Autolayout Swift
- Host: GitHub
- URL: https://github.com/bionelabs/grid
- Owner: bionelabs
- License: mit
- Created: 2020-11-26T03:00:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-26T10:53:04.000Z (over 4 years ago)
- Last Synced: 2025-02-14T21:25:56.489Z (4 months ago)
- Language: Swift
- Size: 1020 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Grid
Make views easy by Autolayout Swift from UIKit## Code
```swift
class ViewController: UIViewController {
let _view: Grid = Grid(
.interitemSpacing(0),
.lineSpacing(0),
.sectionInset(UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)),
View(
.view(Header(text: "HEADER"), 50)
),
Group(tracks: 3,
.view(Label(text: "1"), 150),
.view(Label(text: "2"), 50),
.view(Label(text: "3"), 150),
.view(Label(text: "4"), 50),
.view(Label(text: "5"), 50)
),
Group(tracks: 4,
.square(Label(text: "75")),
.square(Label(text: "75")),
.square(Label(text: "75")),
.square(Label(text: "75"))
),
View(
.view(Header(text: "HEADER"), 50)
),
Group(tracks: 4,
.square(Label(text: "75")),
.view(Label(text: "2"), 50),
.square(Label(text: "75")),
.view(Label(text: "2"), 50)
)
)
override func loadView() {
super.loadView()
self.view = _view
}
override func viewDidLoad() {
super.viewDidLoad()
}
}```
## Demo
## Contact
- Email: [email protected]
- Site: https://onebuffer.com
- Linkedin: https://www.linkedin.com/in/caophuocthanh/