Structure
ResponsiveTextField
public struct ResponsiveTextField
A SwiftUI wrapper around UITextField that gives precise control over the responder state.
Relationships
Nested Types
ResponsiveTextField.Coordinator
ResponsiveTextField.Configuration
Provides a way of configuring the underlying UITextField inside a ResponsiveTextField.
Conforms To
UIViewRepresentable
Initializers
init(placeholder:text:isSecure:adjustsFontForContentSizeCategory:firstResponderDemand:configuration:onFirstResponderStateChanged:handleReturn:handleDelete:shouldChange:supportedStandardEditActions:standardEditActionHandler:)
public init(
placeholder: String,
text: Binding<String>,
isSecure: Bool = false,
adjustsFontForContentSizeCategory: Bool = true,
firstResponderDemand: Binding<FirstResponderDemand?>? = nil,
configuration: Configuration = .empty,
onFirstResponderStateChanged: FirstResponderStateChangeHandler? = nil,
handleReturn: (() -> Void)? = nil,
handleDelete: ((String) -> Void)? = nil,
shouldChange: ((String, String) -> Bool)? = nil,
supportedStandardEditActions: Set<StandardEditAction>? = nil,
standardEditActionHandler: StandardEditActionHandling<UITextField>? = nil
)
Methods
makeUIView(context:)
public func makeUIView(context: Context) -> UITextField
makeCoordinator()
public func makeCoordinator() -> Coordinator
updateUIView(_:context:)
public func updateUIView(_ uiView: UITextField, context: Context)
Will update the text view when the containing view triggers a body re-calculation.
If the first responder state has changed, this may trigger the textfield to become or resign first responder.