How do I dismiss a UITextField
with keyboard type UIKeyboardTypeNumberPad
? The accepted answer to this question suggests to either add a bar with a dismiss button as an inputAccessoryView
or to listen to touch events on the background.
I prefer the second approach, i.e. listen to touch events on the view containing the UITextField
. However, this approach fails if VoiceOver is active. How do you resignFirstResponder
in that situation?