I have a requirement that a user is allowed only开发者_StackOverflow中文版 to enter string value in a text field. I need to ensure that he is not allowed to change the keyboard layout, once the keyboard is presented to him on clicking of the field. Is there a way to disable the button for changing the keyboard layout?
Thanks in advance
This question describes a similar problem - accepting only a numeric value. Adapting this to accept only some subset of characters means that even if the user changes the keyboard, she won't be able to enter invalid input.
Even if you force the user to use a particular keyboard, you should still control the input with the UITextViewDelegate protocol as described in the referenced answer.
精彩评论