Skip to content

Repository files navigation

ReleaseStatus

SwiftPackage

Language

Donate

一个 UI 开发工具

安装

Swift Package Manager

https://github.com/DingSoung/FlexUI master

使用

UIKit 的写法

letview=UIVIew()
view.backgroundColor =.gray
view.frame =CGReact(0,5,200,300)lettext=UILabel()
text.backgroundColor =.orange
text.attrbuteText =...
text.frame =CGReact(10,0,200*0.8,30)
view.addSubView(text)...func layoutSubViews(){
view.frame =....
text.frame =...}

FlexUI的写法

letflexView=View().backgroundColor(.gray).top(0).left(5).width(200).height(300).children([Text().backgroundColor(.orange).left(10).width(80%).height(30).flexGrow(1).content(Text.testAttrbuteString),])
flexView.layout.calculateLayout()
flexView.recursiveSyncFrame()

更多用法请参考 playground

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages