I want to dismiss my current view on the tap of an image but the tappable area of that image is bigger than the actual image (Blue background is also tappable as shown in the image), if I increase the image size the tappable area also increases, How can I remove the blue box around the image but still be able to increase image size?
Image("Cancel")
.resizable()
.scaledToFit()
.contentShape(Circle())
.frame(width: 50, height: 50)
.background(Color.blue)
.onTapGesture {
presentationMode.wrappedValue.dismiss()
}
