i have a problem and read so many Solutions here on Stack but nothing really worked. I have an Form View with different sections, TextFields and at the end one Texteditor. When i click the Texteditor the Editor in the Form should go up over the Keyboard.
My Code:
var body: some View {
NavigationView{
VStack{
Form{
Section{TextField}
Section{TextField}
Section{
ZStack{
TextEditor
}
}
Section{
ZStack{
TextEditor(text: $info)
.ignoresSafeArea(.keyboard)
Text(info).opacity(0).padding(.all, 8)
}
}
}
.frame(alignment: .top)
.navigationBarItems(leading: Button(action: {
self.addUser = false
}, label: {
Image(systemName: "chevron.backward")
}))
}.onTapGesture {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}
}.navigationBarTitle("Kunden Hinzufügen", displayMode: .inline)
}
}