'roundedBorder' is deprecated: Use `RoundedBorderTextFieldStyle` directly instead.
uguizu opened this issue · 1 comments
uguizu commented
Version
macOS version: 10.15
Xcode version: 11.0 beta 6
Description
Describe your problem:
Seems that using this line for TextField .textFieldStyle(.roundedBorder)
is now deprecated.
The correct way should be .textFieldStyle(RoundedBorderTextFieldStyle())
So now the new example should be:
TextField(self.$name, placeholder: self.nameText, onEditingChanged: { changed in
print("onEditing: \(changed)")
}) {
print("userName: \(self.name)")
self.endEditing(true)
}}
.padding(10)
.frame(height: 50)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(EdgeInsets(top: 0, leading: 20, bottom: 0, trailing: 20))
Jinxiansen commented
@uguizu fixed.