Swiftui的Trim允许我制作一个填充了两种不同 colored颜色 的圆形.我现在面临的问题是,我想从水平方向修剪我的圆,但修剪只在垂直方向起作用.我try 使用hstack来帮助这个过程,但没有成功.
Is there any solution to fix this problem?
ZStack {
//HStack get removed from here
Circle()
.trim(from: 0.5, to: 1)
.fill(.blue)
Circle()
.trim(from: 0, to: 0.5)
.fill(.red)
Circle()
.strokeBorder(lineWidth: 24)
}