How can I show a form in EditMode and PresentationMode Environment?
Example:
When user tap on EditButton, it should show Form in EditMode, with text files as input, and changes Navigation Title
import SwiftUI
struct FormView: View {
var body: some View {
NavigationView {
Form {
Text("Placeholder")
// On EditMode it should show this
// TextField("Placeholder", text: Value)
}
.navigationBarTitle("Presentation Mode")
// On EditMode it should show this
// .navigationBarTitle("Edit Mode")
.navigationBarItems(trailing: EditButton())
}
}
}
struct FormView_Previews: PreviewProvider {
static var previews: some View {
FormView()
}
}