Use SwiftUI GeometryReader without affecting outer frame?
You can also try adding .aspectRatio(contentMode: .fit)
modifier to GeometryReader
.
Just add the .fixedSize()
modifier to your HStack. That will achieve the desired affect.
You can also try adding .aspectRatio(contentMode: .fit)
modifier to GeometryReader
.
Just add the .fixedSize()
modifier to your HStack. That will achieve the desired affect.