liquid
Bugfix Patch
用Liquid()创建一个微妙而有趣的后挡板。尝试在艺术品,按钮,甚至用自己的形状后面尝试液体。只需在您的视图中添加Liquid()即可开始!
文件> swift软件包>添加软件包依赖关系:https://github.com/maustinstar/liquid
在您的Package.swift中添加依赖性。
. package ( url : " https://github.com/maustinstar/liquid.git " , from : " 0.0.1 " ) , 只需进口液体,然后将其添加到您的视图中以开始。
struct ContentView : View {
var body : some View {
Liquid ( ) . frame ( width : 200 , height : 200 )
}
}请参阅完整的参考指南。
struct ContentView : View {
var body : some View {
ZStack {
Liquid ( )
. frame ( width : 240 , height : 240 )
. foregroundColor ( . blue )
. opacity ( 0.3 )
Liquid ( )
. frame ( width : 220 , height : 220 )
. foregroundColor ( . blue )
. opacity ( 0.6 )
Liquid ( samples : 5 )
. frame ( width : 200 , height : 200 )
. foregroundColor ( . blue )
Text ( " Liquid " ) . font ( . largeTitle ) . foregroundColor ( . white )
}
}
}查看更多示例。
要开始,请阅读完整的实施指南。
参见贡献。
使用这些软件包将您的SwiftUi应用程序提升到一个新的水平!