开发者

How to disable the changing of keyboard layout by the user in iPhone application

开发者 https://www.devze.com 2022-12-22 03:33 出处:网络
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 keyboa

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消