I do not want an external keyboard to be allowed in my app. I realize this is an edge case but I do not like how the keyboard will not be shown when an external keyboard is used. Especially because I have a custom view above the keyboard that will now be shown at the bottom of the screen. Also, I have textfields that should only require numbers (phonenumber for example). Instead of checking input, I would rather just show the numbers keyboard. Obviously this can’t happen with external keyboard.
I saw a post here: How to detect external keyboard connectification in objective-c?
but that’s not enough to just detect it…I want to disable!
Thanks,
-Adam
Here are two things you can do to circumvent this problem:
You can force the keyboard to appear even when there is an external keyboard present.
You can validate text input using the
UITextFielddelegate methodFor example, to allow only numbers to be entered, you can do: