【发布时间】:2020-12-27 04:15:50
【问题描述】:
我无法调整我创建的文本编辑器的外观。文本会有边距。 我试着自己做,但我搞砸了,我做不到。我希望它像图片一样。
VStack {
TextEditor(text: $inputText)
.background(Color.black)
.frame(height:geometry.size.height / 3, alignment: .center)
.cornerRadius(25)
.border(Color.yellow, width: 5)
.lineSpacing(10)
.autocapitalization(.words)
.disableAutocorrection(true)
.padding()
}
Spacer().frame(height: geometry.size.height / 15)
VStack {
Button(action: {}, label: {
Text("Gönder")
.frame(width: geometry.size.width / 3, height: 50)
.padding(10)
.font(Font.system(size: 30, weight: .medium, design: .serif))
.foregroundColor(.white)
.background(RoundedRectangle(cornerRadius: 30))
.foregroundColor(.init(red: 45 / 255, green: 0 / 255, blue: 112 / 255))
})
}
【问题讨论】:
-
到底是什么问题?你能解释一下你想要什么吗?
-
我正在尝试和图片中的一样,但是文本编辑器无法设置圆角半径和边框颜色
-
我无法调整文本和编辑器@Quail Bellal 之间的间距