Skip to content
/ Fluid Public

Use a declarative syntax to build your user interface using UIKit like SwiftUI. 使用类似 SwiftUI 的声明式语法布局 UIKit 视图。

License

Notifications You must be signed in to change notification settings

octree/Fluid

Repository files navigation

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

Demo

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.

About

Use a declarative syntax to build your user interface using UIKit like SwiftUI. 使用类似 SwiftUI 的声明式语法布局 UIKit 视图。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages