Добрый день, у меня следующая проблема: есть 2 TextField в swift ui, при вводе текста в первом, после 1 символа мгновенно переводит на 2ой textfield, по, конечно же, неизвестной мне причине:
struct NewNoteView: View {
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
@StateObject var viewModel: NoteViewModel
@Binding var note: Note
var body: some View {
VStack{
VStack(alignment: .leading){
Text("Title:")
.font(.callout)
.bold()
MultilineTextField(
"Enter title of day",
text:self.$note.title
).overlay(RoundedRectangle(cornerRadius: 4).stroke(Color.gray))
}
VStack(alignment: .leading){
Text("Description:")
.font(.callout)
.bold()
MultilineTextField(
"Enter description of day",
text:self.$note.story
).overlay(RoundedRectangle(cornerRadius: 4).stroke(Color.gray))
}
Spacer()
}.padding()
.navigationTitle(note.title)
.navigationBarBackButtonHidden(true)
.navigationBarItems(leading: Button("Save", action: {
viewModel.saveNote(note: note)
self.presentationMode.wrappedValue.dismiss()
}), trailing: Text(
note.date))
}
}