TextFieldWithVerticalAxisType

@MainActor
public struct TextFieldWithVerticalAxisType : IntrospectableViewType

An abstract representation of the TextField type in SwiftUI, with .vertical axis.

struct ContentView: View {
    @State var text = "Lorem ipsum"

    var body: some View {
        TextField("Text Field", text: $text, axis: .vertical)
            .introspect(.textField(axis: .vertical), on: .iOS(.v16Later)) {
                print(type(of: $0)) // UITextView
            }
    }
}
  • Undocumented

    See more

    Declaration

    Swift

    public enum Axis