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
How about this:
struct ResizedImage: View { var body: some View { Image("myImage") .resizable() .scaledToFit() .frame(width: 200.0,height:200) } }
the image view is 200x200, but the image maintains the original aspect ratio (rescaling within that frame)