Add keyboard dismiss toolbar for iOS numeric and multi-line fields

Creates a reusable KeyboardDismissToolbar view modifier that adds a
"Done" button to dismiss keyboards that don't have a return key.
Applied to all numeric keyboards (numberPad, decimalPad, phonePad)
and multi-line text inputs (TextEditor, TextField with axis: .vertical).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-15 21:20:33 -06:00
parent e44bcdd988
commit e7c09f687a
9 changed files with 44 additions and 0 deletions
@@ -112,6 +112,7 @@ struct CompleteTaskView: View {
.foregroundStyle(.secondary)
}
.padding(.leading, 12)
.keyboardDismissToolbar()
} label: {
Label(L10n.Tasks.actualCost, systemImage: "dollarsign.circle")
}
@@ -132,6 +133,7 @@ struct CompleteTaskView: View {
TextEditor(text: $notes)
.frame(minHeight: 100)
.scrollContentBackground(.hidden)
.keyboardDismissToolbar()
}
} footer: {
Text(L10n.Tasks.optionalNotes)