Skip to content

Commit 596dc66

Browse files
committed
wip
1 parent e86a27c commit 596dc66

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

Sources/ViewTypes/View.swift

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,42 @@ import SwiftUI
22

33
/// An abstract representation of a generic view type in SwiftUI.
44
///
5+
/// ### iOS
6+
///
7+
/// ```swift
8+
/// struct ContentView: View {
9+
/// var body: some View {
10+
/// NavigationView {
11+
/// Text("Root")
12+
/// .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17)) {
13+
/// print(type(of: $0)) // UIViewController
14+
/// }
15+
/// }
16+
/// .navigationViewStyle(.stack)
17+
/// }
18+
/// }
19+
/// ```
20+
///
21+
/// ### tvOS
22+
///
523
/// ```swift
624
/// struct ContentView: View {
725
/// var body: some View {
826
/// NavigationView {
927
/// Text("Root")
10-
/// #if os(iOS) || os(tvOS)
11-
/// .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) {
28+
/// .introspect(.view, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) {
1229
/// print(type(of: $0)) // UIViewController
1330
/// }
14-
/// #endif
1531
/// }
1632
/// .navigationViewStyle(.stack)
1733
/// }
1834
/// }
1935
/// ```
36+
///
37+
/// ### macOS
38+
///
39+
/// Not available.
40+
///
2041
public struct ViewType: IntrospectableViewType {
2142
public var scope: IntrospectionScope { [.receiver, .ancestor] }
2243
}

0 commit comments

Comments
 (0)