TextField ⟩ styles
// ⭐️ parent view 使用 .textFieldStyle() 才不會失去 context。
view.textFieldStyle(.roundedBorder)
// ⭐️ text field 可使用 custom method,使語意更簡潔。
textField.style(.roundedBorder) // custom method👉 see: textField.style(_:)
SwiftUI ⟩ Views and Controls ⟩ TextField ⟩
textField.textFieldStyle(_:)
SwiftOnTap ⟩
TextFieldStyle (protocol)
view.textFieldStyle(_:)
Last updated
Was this helpful?