When I open my new page, and then select TextField keyboard open but toolbar with done button not shown. After I took my app background mode to foreground mode toolbar with done button shown.
This is my simple code.
@FocusState private var isFocused: Bool
var body: some View {
TextField("Name", text: $name)
.frame(width: .infinity, height: 40)
.padding(.all)
.focused($isFocused)
.toolbar {
ToolbarItemGroup(placement: .keyboard) {
Spacer()
Button("Done") {
isFocused = false
}
}
}
}
This is the situation Link
I try everything,
Put it my textfield on VStack call toolbar in vstack, I put every where but same problem.
New contributor
Emiray Nakip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.