Skip to content

Commit 3615d13

Browse files
committed
Update Example
1 parent 64ee02b commit 3615d13

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Example/Example/DownsampleGridView.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ struct DownsampleGridView: View {
55

66
@State private var url = Util.Grid.url
77
@State private var showsDetail: Bool = false
8-
@State private var size: CGSize = .init(width: 160, height: 160)
8+
@State private var height: Double = 160
99

1010
var body: some View {
1111
VStack {
@@ -18,13 +18,12 @@ struct DownsampleGridView: View {
1818
} label: {
1919
AsyncDownSamplingImage(
2020
url: url,
21-
downsampleSize: .size(Util.Grid.bufferedImageSize)
21+
downsampleSize: .height(height)
2222
) { image in
2323
image.resizable()
2424
.aspectRatio(contentMode: .fit)
2525
.frame(
26-
width: size.width,
27-
height: size.height
26+
height: height
2827
)
2928
} onFail: { error in
3029
Text("Error: \(error.localizedDescription)")

0 commit comments

Comments
 (0)