Skip to main content

How to remove row separators from a Form or List in SwiftUI?

Struggling to hide the SwiftUI separators in a List or Form? 

 

The challenge

Creating the following form, separation lines appeared between NameLayout, FinalPhoto, RawPhoto, ApertureLayout and SubmitButton.

var body: some View {
    GeometryReader { geometry in
      Form {
        // layout elements
        NameLayout()
        FinalPhoto()
        RawPhoto()
        ApertureLayout()
        SubmitButton()
      }
    }
}

 

Subscribe to form