Home > Software design >  Image does not maintain its ratio even with custom width and height
Image does not maintain its ratio even with custom width and height

Time:07-12

Here i have an image that i want to display inside a stack. This stack has a fixed width & height.

Image("greatForestStart")
 .resizable()
 .scaleToFill()
 .frame(width: 450, height: 450)

But it does not maintain its original ratio.enter image description here

  • Related