Form Use Default padding in SwiftUI View.

Hey,

I am trying to use Form for picker and when I use Form it take default padding in the view. is there any idea to resolve this so I can use complete view without padding.
Here is my code
Code Block
struct PickerView: View {
    var frameworks = ["UIKit", "Core Data", "CloudKit", "SwiftUI"]
    @State private var selectedFrameworkIndex = 0
    var body: some View {
Form{
        Picker(selection: $selectedFrameworkIndex, label: Text("Favorite Framework")) {
            ForEach(0 ..< frameworks.count) {
                Text(self.frameworks[$0])
            }
        }
}
    }
}

Also I have one more issue when I come back after pick any item my picker stay highlighted. please Help in this.
Thanks in advanced.

Hi,
Form only has one style, which is the InsetGrouped Style. You can change the Form to a List and apply a ListStyle(). Keep in Mind that this will change the appearance of the picker, so maybe use a .pickerStyle().

Take care,
David
Form Use Default padding in SwiftUI View.
 
 
Q