File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 1
1
import SwiftUI
2
2
3
- // MARK: SwiftUI.TextField(..., axis: .vertical)
4
-
3
+ /// An abstract representation of the `TextField` type in SwiftUI, with `.vertical` style.
4
+ ///
5
+ /// ```swift
6
+ /// struct ContentView: View {
7
+ /// @State var text = "Lorem ipsum"
8
+ ///
9
+ /// var body: some View {
10
+ /// TextField("Text Field", text: $text, axis: .vertical)
11
+ /// #if os(iOS)
12
+ /// .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17)) {
13
+ /// print(type(of: $0)) // UITextView
14
+ /// }
15
+ /// #elseif os(tvOS)
16
+ /// .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17)) {
17
+ /// print(type(of: $0)) // UITextField
18
+ /// }
19
+ /// #elseif os(macOS)
20
+ /// .introspect(.textField(axis: .vertical), on: .macOS(.v13, .v14)) {
21
+ /// print(type(of: $0)) // NSTextField
22
+ /// }
23
+ /// #endif
24
+ /// }
25
+ /// }
26
+ /// ```
5
27
public struct TextFieldWithVerticalAxisType : IntrospectableViewType {
6
28
public enum Axis {
7
29
case vertical
You can’t perform that action at this time.
0 commit comments