Closed Kyle-Ye closed 3 months ago
Using .context([.imageScaleFactor] = 2)
?
See SDWebImageContext.h
Maybe we can polish this API to automatically pass down the scale into the context
arg used in SDWebImage Core
Maybe we can polish this API to automatically pass down the scale into the
context
arg used in SDWebImage Core
+1. See the following documentation of AsyncImage.
.context([.imageScale] = 2)
Do you mean using context: [.imageScaleFactor: 2]
in current init API?
[SDWebImageContextOption : Any]
is using Any so .imageScaleFactor
can pass a non-number here.
Another way is appending scale = 1
in all WebImage's init. But what if user set both scale and context: [.imageScaleFactor: 2] at the same time?
Any
is the only way in Objc API...I already have a plan for SDWebImage 6 which use the enum associated object
and each key value should be typed..imageScale
, then it has the highest priority. Since the the scale = 1
is default paramCan we expect a new 3.0.5 or 3.1.0 release?
The corresponding SwiftUI.AsyncImage snippets.