Skip to content

Commit 12dec90

Browse files
committed
WIP
1 parent 7167c94 commit 12dec90

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

Examples/Showcase/Showcase/Navigation.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ struct NavigationShowcase: View {
55
var body: some View {
66
NavigationView {
77
Text("Content")
8-
.modifier {
9-
if #available(iOS 15, tvOS 15, macOS 12, *) {
10-
$0.searchable(text: .constant(""))
11-
} else {
12-
$0
13-
}
14-
}
8+
.searchable(text: .constant(""))
159
#if os(iOS) || os(visionOS)
1610
.navigationBarTitle(Text("Customized"), displayMode: .inline)
1711
#elseif os(macOS)

Examples/Showcase/Showcase/Presentation.swift

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,18 @@ struct PresentationShowcase: View {
2626
#endif
2727
}
2828

29-
if #available(iOS 14, tvOS 14, *) {
30-
Button("Full Screen Cover", action: { isFullScreenPresented = true })
31-
.fullScreenCover(isPresented: $isFullScreenPresented) {
32-
Button("Dismiss", action: { isFullScreenPresented = false })
33-
#if os(iOS) || os(tvOS) || os(visionOS)
34-
.introspect(
35-
.fullScreenCover,
36-
on: .iOS(.v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
37-
) { presentationController in
38-
presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75)
39-
}
40-
#endif
41-
}
42-
}
29+
Button("Full Screen Cover", action: { isFullScreenPresented = true })
30+
.fullScreenCover(isPresented: $isFullScreenPresented) {
31+
Button("Dismiss", action: { isFullScreenPresented = false })
32+
#if os(iOS) || os(tvOS) || os(visionOS)
33+
.introspect(
34+
.fullScreenCover,
35+
on: .iOS(.v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
36+
) { presentationController in
37+
presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75)
38+
}
39+
#endif
40+
}
4341

4442
#if os(iOS) || os(visionOS)
4543
Button("Popover", action: { isPopoverPresented = true })

0 commit comments

Comments
 (0)