Skip to content

Commit 8a68a1a

Browse files
committed
WIP
1 parent 7807a92 commit 8a68a1a

File tree

1 file changed

+21
-28
lines changed

1 file changed

+21
-28
lines changed

Sources/ViewTypes/View.swift

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
#if !os(watchOS)
22
/// An abstract representation of a generic SwiftUI view type.
33
///
4+
/// Note: prior to iOS 26, `Text`, `Image`, and `Button` were drawn inside a subclass of
5+
/// `UIView` called `_UIGraphicsView` which was introspectable via `.introspect(.view)`,
6+
/// however starting iOS 26 this is no longer the case and all SwiftUI primitives
7+
/// seem to somehow be drawn without an underlying `UIView` vessel.
8+
///
49
/// ### iOS
510
///
611
/// ```swift
712
/// struct ContentView: View {
813
/// var body: some View {
9-
/// HStack {
10-
/// Image(systemName: "scribble")
11-
/// Text("Some text")
12-
/// }
13-
/// .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) {
14-
/// print(type(of: $0)) // some subclass of UIView
15-
/// }
14+
/// ExampleUIViewRepresentable()
15+
/// .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) {
16+
/// print(type(of: $0)) // some subclass of UIView
17+
/// }
1618
/// }
1719
/// }
1820
/// ```
@@ -22,13 +24,10 @@
2224
/// ```swift
2325
/// struct ContentView: View {
2426
/// var body: some View {
25-
/// HStack {
26-
/// Image(systemName: "scribble")
27-
/// Text("Some text")
28-
/// }
29-
/// .introspect(.view, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) {
30-
/// print(type(of: $0)) // some subclass of UIView
31-
/// }
27+
/// ExampleUIViewRepresentable()
28+
/// .introspect(.view, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26)) {
29+
/// print(type(of: $0)) // some subclass of UIView
30+
/// }
3231
/// }
3332
/// }
3433
/// ```
@@ -38,13 +37,10 @@
3837
/// ```swift
3938
/// struct ContentView: View {
4039
/// var body: some View {
41-
/// HStack {
42-
/// Image(systemName: "scribble")
43-
/// Text("Some text")
44-
/// }
45-
/// .introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15, .v26)) {
46-
/// print(type(of: $0)) // some subclass of NSView
47-
/// }
40+
/// ExampleUIViewRepresentable()
41+
/// .introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15, .v26)) {
42+
/// print(type(of: $0)) // some subclass of NSView
43+
/// }
4844
/// }
4945
/// }
5046
/// ```
@@ -54,13 +50,10 @@
5450
/// ```swift
5551
/// struct ContentView: View {
5652
/// var body: some View {
57-
/// HStack {
58-
/// Image(systemName: "scribble")
59-
/// Text("Some text")
60-
/// }
61-
/// .introspect(.view, on: .visionOS(.v1, .v2, .v26)) {
62-
/// print(type(of: $0)) // some subclass of UIView
63-
/// }
53+
/// ExampleUIViewRepresentable()
54+
/// .introspect(.view, on: .visionOS(.v1, .v2, .v26)) {
55+
/// print(type(of: $0)) // some subclass of UIView
56+
/// }
6457
/// }
6558
/// }
6659
/// ```

0 commit comments

Comments
 (0)