I have a large image in Assets.xcassets. How to resize this image with SwiftUI to make it small?
I tried to set frame but it doesn\'t work:
Image(roo
In SwiftUI, use the .resizable() method to resize an image. By using .aspectRatio() and specifying a ContentMode, you can either "Fit" or "Fill" the image, as appropriate.
For example, here is code that resizes the image by fitting:
Image("example-image")
.resizable()
.aspectRatio(contentMode: .fit)