File tree Expand file tree Collapse file tree 3 files changed +19
-13
lines changed
SDWebImageSwiftUI/Classes Expand file tree Collapse file tree 3 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 8
8
- libwebp/mux (1.0.3):
9
9
- libwebp/demux
10
10
- libwebp/webp (1.0.3)
11
- - SDWebImage (5.2.3 ):
12
- - SDWebImage/Core (= 5.2.3 )
13
- - SDWebImage/Core (5.2.3 )
14
- - SDWebImageSwiftUI (0.4 .2):
11
+ - SDWebImage (5.2.5 ):
12
+ - SDWebImage/Core (= 5.2.5 )
13
+ - SDWebImage/Core (5.2.5 )
14
+ - SDWebImageSwiftUI (0.5 .2):
15
15
- SDWebImage (~> 5.1)
16
16
- SDWebImageWebPCoder (0.2.5):
17
17
- libwebp (~> 1.0)
@@ -33,8 +33,8 @@ EXTERNAL SOURCES:
33
33
34
34
SPEC CHECKSUMS:
35
35
libwebp: 057912d6d0abfb6357d8bb05c0ea470301f5d61e
36
- SDWebImage: 46a7f73228f84ce80990c786e4372cf4db5875ce
37
- SDWebImageSwiftUI: b91be76ecb0cdf74c18f6cd92aae8f19a9ded02d
36
+ SDWebImage: 4eabf2fa6695c95c47724214417a9c036c965e4a
37
+ SDWebImageSwiftUI: 3a3e3aa707aeedf024af6f9c718177f681edf9de
38
38
SDWebImageWebPCoder: 947093edd1349d820c40afbd9f42acb6cdecd987
39
39
40
40
PODFILE CHECKSUM: 3fb06a5173225e197f3a4bf2be7e5586a693257a
Original file line number Diff line number Diff line change @@ -62,13 +62,11 @@ struct DetailView: View {
62
62
. scaledToFit ( )
63
63
#else
64
64
WebImage ( url: URL ( string: url) , options: [ . progressiveLoad] )
65
- . indicator (
66
- Indicator { isAnimating, progress in
67
- ProgressBar ( value: progress)
68
- . foregroundColor ( . blue)
69
- . frame ( maxHeight: 6 )
70
- }
71
- )
65
+ . indicator { isAnimating, progress in
66
+ ProgressBar ( value: progress)
67
+ . foregroundColor ( . blue)
68
+ . frame ( maxHeight: 6 )
69
+ }
72
70
. resizable ( )
73
71
. scaledToFit ( )
74
72
#endif
Original file line number Diff line number Diff line change @@ -179,6 +179,14 @@ extension WebImage {
179
179
result. indicator = indicator
180
180
return result
181
181
}
182
+
183
+ /// Associate a indicator when loading image with url, convenient method with block
184
+ /// - Parameter indicator: The indicator type, see `Indicator`
185
+ public func indicator< T> ( @ViewBuilder builder: @escaping ( _ isAnimating: Binding < Bool > , _ progress: Binding < CGFloat > ) -> T ) -> WebImage where T : View {
186
+ var result = self
187
+ result. indicator = Indicator ( builder: builder)
188
+ return result
189
+ }
182
190
}
183
191
184
192
#if DEBUG
You can’t perform that action at this time.
0 commit comments