Skip to content

Commit aba2ea9

Browse files
committed
WIP
1 parent 2779bd9 commit aba2ea9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Examples/Showcase/Showcase/ScrollView.swift

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ struct ScrollViewShowcase: View {
3333
.scrollView,
3434
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
3535
) { _ in
36-
receiverScrollViewFound = true
36+
DispatchQueue.main.async {
37+
receiverScrollViewFound = true
38+
}
3739
}
3840
#elseif os(macOS)
3941
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15, .v26)) { scrollView in
40-
scrollView.drawsBackground = true
41-
scrollView.backgroundColor = .cyan
42+
DispatchQueue.main.async {
43+
receiverScrollViewFound = true
44+
}
4245
}
4346
#endif
4447

@@ -55,12 +58,15 @@ struct ScrollViewShowcase: View {
5558
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26),
5659
scope: .ancestor
5760
) { _ in
58-
ancestorScrollViewFound = true
61+
DispatchQueue.main.async {
62+
ancestorScrollViewFound = true
63+
}
5964
}
6065
#elseif os(macOS)
6166
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15, .v26), scope: .ancestor) { scrollView in
62-
scrollView.drawsBackground = true
63-
scrollView.backgroundColor = .cyan
67+
DispatchQueue.main.async {
68+
ancestorScrollViewFound = true
69+
}
6470
}
6571
#endif
6672
}

0 commit comments

Comments
 (0)