KarrotFlex
Declarative UI sugar framework built on FlexLayout
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
self.someView.flex.define { flex in
FlexRow(flex) { row in
FlexSpacer(row, width: 24.0)
FlexColumn(row) { col in
FlexItem(col, view: self.titleLabel)
FlexSpacer(col, height: 8.0)
FlexItem(col, view: self.descLabel)
FlexSpacer(col, height: 24.0)
FlexItem(col, view: self.infoLabel)
}
}
.padding(16.0)
}
Requirements
Installation
CocoaPods
pod 'KarrotFlex'
Swift Package Manager
In your Package.swift:
let package = Package(
name: "Example",
dependencies: [
.package(url: "https://github.com/daangn/KarrotFlex.git", from: "0.0.1")
],
targets: [
.target(name: "Example", dependencies: ["KarrotFlex"])
]
)
Author
License
KarrotFlex is available under the MIT license. See the LICENSE file for more info.