Create textfield with border in swiftUI || textfield corner swiftUI
Solution:
Use the below code to create textfield with border in swiftUI.
struct textField: View {
@State var textValue:String = ""
var body: some View {
let tField = TextField("", text: $textValue)
.background(Color.black)
.cornerRadius(10.0)
.border(Color.gray, width: 1)
return tField
}
}
Comments
Post a Comment