一个 UI 开发工具
Swift Package Manager
https://github.com/DingSoung/FlexUI masterUIKit 的写法
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