We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64ee02b commit 3615d13Copy full SHA for 3615d13
1 file changed
Example/Example/DownsampleGridView.swift
@@ -5,7 +5,7 @@ struct DownsampleGridView: View {
5
6
@State private var url = Util.Grid.url
7
@State private var showsDetail: Bool = false
8
- @State private var size: CGSize = .init(width: 160, height: 160)
+ @State private var height: Double = 160
9
10
var body: some View {
11
VStack {
@@ -18,13 +18,12 @@ struct DownsampleGridView: View {
18
} label: {
19
AsyncDownSamplingImage(
20
url: url,
21
- downsampleSize: .size(Util.Grid.bufferedImageSize)
+ downsampleSize: .height(height)
22
) { image in
23
image.resizable()
24
.aspectRatio(contentMode: .fit)
25
.frame(
26
- width: size.width,
27
- height: size.height
+ height: height
28
)
29
} onFail: { error in
30
Text("Error: \(error.localizedDescription)")
0 commit comments