Hello how do i dismiss the ios numeric keyboard af...
# compose-ios
d
Hello how do i dismiss the ios numeric keyboard after typing. The characters keyboard have a done button that dismisses the keyboard. the done button is missing in the numeric keyboard, kindly assist
t
The iOS numeric keyboard does not include a 'done' button, so what is typically done is that you have to add your own UIToolbar with a Done button to it. This is often done by attaching an input Accessory to the UITextField. But in the CMP case, this is not possible. What I did was hook into the local notifications for keyboard hide and show. It does not do the right animation as yet, but it works. Also note it uses SnapKit, which can be replaced with raw iOS constraint code if needed.
Call setupKeyboard from your viewDidLoad.
d
Thank you so much Tyler
👍 1