@@ -2,6 +2,8 @@ import SwiftUI
2
2
3
3
/// An abstract representation of the `TabView` type in SwiftUI, with `.page` style.
4
4
///
5
+ /// ### iOS
6
+ ///
5
7
/// ```swift
6
8
/// struct ContentView: View {
7
9
/// var body: some View {
@@ -10,14 +12,34 @@ import SwiftUI
10
12
/// Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue)
11
13
/// }
12
14
/// .tabViewStyle(.page(indexDisplayMode: .always))
13
- /// #if os(iOS) || os(tvOS)
14
- /// .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17)) {
15
+ /// .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17)) {
15
16
/// print(type(of: $0)) // UICollectionView
16
17
/// }
17
- /// #endif
18
18
/// }
19
19
/// }
20
20
/// ```
21
+ ///
22
+ /// ### tvOS
23
+ ///
24
+ /// ```swift
25
+ /// struct ContentView: View {
26
+ /// var body: some View {
27
+ /// TabView {
28
+ /// Text("Page 1").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red)
29
+ /// Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue)
30
+ /// }
31
+ /// .tabViewStyle(.page(indexDisplayMode: .always))
32
+ /// .introspect(.tabView(style: .page), on: .tvOS(.v14, .v15, .v16, .v17)) {
33
+ /// print(type(of: $0)) // UICollectionView
34
+ /// }
35
+ /// }
36
+ /// }
37
+ /// ```
38
+ ///
39
+ /// ### macOS
40
+ ///
41
+ /// Not available.
42
+ ///
21
43
public struct TabViewWithPageStyleType : IntrospectableViewType {
22
44
public enum Style {
23
45
case page
0 commit comments