An open API service indexing awesome lists of open source software.

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

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/