UIViewBuilder:从FunctionBuilder生成UIKit(不是SwiftUI)组件 源码

distributive5502 6 0 ZIP 2021-04-27 12:04:11

UIViewBuilder 使用纯UIKit的替代SwiftUI。 来自iOS9的支持。 这是在制品项目。 所有API都不固定。 让我们在“示例”应用中尝试这些功能。 HostingController { VStack { if isHello { Label ( text : " hello " ) } else { Label ( text : " good night " ) } Label ( text : " world " ) } } HostingController { List { ForEach ( data : [ 0 ..< 1000 ]) { Label ( text : " \( $0 ) " ) } } }

用户评论
请输入评论内容
评分:
暂无评论