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(room.thumbnailImage)
.frame(width: 32.0, height: 32.0)
iosswiftswiftui
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(room.thumbnailImage)
.frame(width: 32.0, height: 32.0)
Best Answer
You should use
.resizable()
before applying any size modifications on anImage
.