skip to Main Content

Ios swift – How can I make the frame height dynamic to the height of the image so that the image wont get cropped?

if let postImageURL = post.imageURL { GeometryReader{ geometry in let size = geometry.size WebImage(url: postImageURL) .resizable() .aspectRatio(contentMode: .fit) .frame(width: size.width, height: size.height) .onTapGesture { isFullScreen = true } } .clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous)) .frame(height: 200) } this is my current…

VIEW QUESTION
Back To Top
Search