I have a form being loaded inside a navigation stack and I'm showing an image and title in the first form section with the code below:
Form {
Section {
VStack {
Image("AboutIcon")
.resizable()
.frame(width: 96, height: 96)
.clipShape(RoundedRectangle(cornerRadius: 16))
Text("LinkSwing")
.font(.headline)
}
.frame(maxWidth: .infinity)
}
.listRowBackground(Color(.systemGroupedBackground))
}
When rendered, there is significant top and bottom padding surrounding the section, highlighted in purple in the image below.
I have tried various options to set padding, edge insets, etc., but have not found the right option or combination to eliminate the unnecessary top and bottom padding.
Any suggestions and/or tips for how I can diagnose similar layout problems in the future?