SwiftUI Full Screen Width Content Within Form

805 Views Asked by At

How can I have a Form with one element in the Form taking up the full screen width? I tried putting the Form into a ScrollView but then there are other issues and it might not be a good idea to nest 2 scrolling views.

struct ContentView: View {

    var body: some View {
        Form {
            Text("Other content of Form")
            Section {
                Image(systemName: "pencil.circle.fill")
                    .resizable()
                    .aspectRatio(contentMode: .fill)
                    .listRowInsets(.none)
            }
        }
    }
}

This is how it looks now: Starting Layout

And this is what I want it to look: Desired Layout

1

There are 1 best solutions below

0
On

I decided to do a ScrollView and inset + style the child elements instead.