【发布时间】:2020-11-20 20:26:28
【问题描述】:
我在 SwiftUI(使用 Xcode)中创建了一个 ProgressView 并进行了一些编辑,但还没有弄清楚如何更改它的高度。
struct ProgressBar: View {
var body: some View {
VStack {
ProgressView("Progres:", value: 50, total: 100)
}.foregroundColor(Color(UIColor.systemBlue))
.scaleEffect(1, anchor: .center)
.accentColor(Color(UIColor.systemGreen))
}
}
【问题讨论】:
-
尝试
.scaleEffect修饰符,回答here -
我试过了,但这改变了整个 ProgressView,而不仅仅是我想要的线性线。
-
啊,我没有通读整张图片。
标签: ios swift xcode swiftui uiprogressview