Open onmyway133 opened 1 year ago
Instead of letting the Image decide the size, we can put it as background or overlay. I use clipped and contentShape to avoid the fill image obscuring touch event
background
overlay
clipped
contentShape
Color.clear .frame(height: 100) .overlay { AsyncImage(url: item.imageUrl) { image in image .resizable() .scaledToFill() } placeholder: { ProgressView() } } .clipped() .contentShape(Rectangle())
Instead of letting the Image decide the size, we can put it as
background
oroverlay
. I useclipped
andcontentShape
to avoid the fill image obscuring touch event