expo-simple-gallery 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,7 +33,7 @@ final class SwiftUIGalleryHostView: ExpoView, ViewerProtocol {
|
|
|
33
33
|
}
|
|
34
34
|
)
|
|
35
35
|
let hc = UIHostingController(rootView: swiftUIView)
|
|
36
|
-
hc.view.backgroundColor = .
|
|
36
|
+
hc.view.backgroundColor = .clear
|
|
37
37
|
return hc
|
|
38
38
|
}()
|
|
39
39
|
|
|
@@ -47,7 +47,7 @@ final class SwiftUIGalleryHostView: ExpoView, ViewerProtocol {
|
|
|
47
47
|
|
|
48
48
|
// Attach hostingController's view as a subview (triggers lazy init safely)
|
|
49
49
|
let hostedView = hostingController.view!
|
|
50
|
-
hostedView.backgroundColor = .
|
|
50
|
+
hostedView.backgroundColor = .clear
|
|
51
51
|
hostedView.translatesAutoresizingMaskIntoConstraints = false
|
|
52
52
|
addSubview(hostedView)
|
|
53
53
|
|
|
@@ -12,15 +12,10 @@ struct SwiftUIGalleryView: View {
|
|
|
12
12
|
var onImageLoaded: (Int, String) -> Void
|
|
13
13
|
var onDismissAttempt: () -> Void
|
|
14
14
|
|
|
15
|
-
@State private var backgroundOpacity: Double = 1.0
|
|
16
15
|
var body: some View {
|
|
17
16
|
ZStack {
|
|
18
|
-
Color.black
|
|
19
|
-
.opacity(backgroundOpacity)
|
|
20
|
-
.ignoresSafeArea()
|
|
21
|
-
|
|
22
17
|
if viewModel.uris.isEmpty {
|
|
23
|
-
Color.
|
|
18
|
+
Color.clear.ignoresSafeArea()
|
|
24
19
|
} else {
|
|
25
20
|
TabView(selection: $viewModel.index) {
|
|
26
21
|
ForEach(viewModel.uris.indices, id: \.self) { i in
|
|
@@ -32,7 +27,7 @@ struct SwiftUIGalleryView: View {
|
|
|
32
27
|
onDragProgress: { _ in }
|
|
33
28
|
)
|
|
34
29
|
.tag(i)
|
|
35
|
-
.background(
|
|
30
|
+
.background(.clear)
|
|
36
31
|
.ignoresSafeArea()
|
|
37
32
|
}
|
|
38
33
|
}
|