@@ -2,28 +2,51 @@ import SwiftUI
2
2
3
3
/// An abstract representation of the `TextField` type in SwiftUI, with `.vertical` axis.
4
4
///
5
+ /// ### iOS
6
+ ///
5
7
/// ```swift
6
8
/// struct ContentView: View {
7
9
/// @State var text = "Lorem ipsum"
8
10
///
9
11
/// var body: some View {
10
12
/// TextField("Text Field", text: $text, axis: .vertical)
11
- /// #if os(iOS)
12
13
/// .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17)) {
13
14
/// print(type(of: $0)) // UITextView
14
15
/// }
15
- /// #elseif os(tvOS)
16
+ /// }
17
+ /// }
18
+ /// ```
19
+ ///
20
+ /// ### tvOS
21
+ ///
22
+ /// ```swift
23
+ /// struct ContentView: View {
24
+ /// @State var text = "Lorem ipsum"
25
+ ///
26
+ /// var body: some View {
27
+ /// TextField("Text Field", text: $text, axis: .vertical)
16
28
/// .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17)) {
17
29
/// print(type(of: $0)) // UITextField
18
30
/// }
19
- /// #elseif os(macOS)
31
+ /// }
32
+ /// }
33
+ /// ```
34
+ ///
35
+ /// ### macOS
36
+ ///
37
+ /// ```swift
38
+ /// struct ContentView: View {
39
+ /// @State var text = "Lorem ipsum"
40
+ ///
41
+ /// var body: some View {
42
+ /// TextField("Text Field", text: $text, axis: .vertical)
20
43
/// .introspect(.textField(axis: .vertical), on: .macOS(.v13, .v14)) {
21
44
/// print(type(of: $0)) // NSTextField
22
45
/// }
23
- /// #endif
24
46
/// }
25
47
/// }
26
48
/// ```
49
+ ///
27
50
public struct TextFieldWithVerticalAxisType : IntrospectableViewType {
28
51
public enum Axis {
29
52
case vertical
0 commit comments