mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Add Done button toolbar to number pads
This commit is contained in:
parent
e0229fde0f
commit
304f46ba02
2 changed files with 16 additions and 0 deletions
|
|
@ -181,6 +181,14 @@ struct RegisterFragment: View {
|
|||
.autocapitalization(.none)
|
||||
.padding(.leading, 5)
|
||||
.keyboardType(.numberPad)
|
||||
.toolbar {
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
Spacer()
|
||||
Button("Done") {
|
||||
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
.onChange(of: registerViewModel.phoneNumber) { _ in
|
||||
if !registerViewModel.phoneNumberError.isEmpty {
|
||||
registerViewModel.phoneNumberError = ""
|
||||
|
|
|
|||
|
|
@ -379,6 +379,14 @@ struct EditContactFragment: View {
|
|||
.padding(.vertical, 15)
|
||||
.background(.white)
|
||||
.cornerRadius(60)
|
||||
.toolbar {
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
Spacer()
|
||||
Button("Done") {
|
||||
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue