Use a declarative syntax to build your user interface using UIKit like SwiftUI

Fluid

Fluid is powered by ResultBuilder and a custom layout engine. You can uses a declarative syntax to build your user interface using UIKit like SwiftUI. Your code is simpler and easier to read.

Examples

HStack(spacing: 16) {
    self.imageView
        .resizable()
        .aspectRatio(1)
        .frame(width: 80)
        .overlay {
            self.editButton
                .resizable()
                .frame(width: 25%, height: 25%)
                .offset(x: -3, y: -3)
                .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottomTrailing)
        }
    VStack(alignment: .leading) {
        nameLabel
        detailLabel
    }
    Spacer()
    chevronImageView
        .resizable()
        .frame(width: 20, height: 20)
}
.padding()
.background(backgroundView)

Installation

Swift Package Manager

License

Fluid is available under the MIT license. See the LICENSE file for more info.

GitHub

View Github