Change Keyboard Language In iOS App When Click In UITextField

只愿长相守 提交于 2019-12-22 17:35:07

问题


i tried many ways to change keyboard in ipad programmatically but it doesn't change at all . i cant find any property in uitext for doing this.

any idea?


回答1:


Unfortunately, you cannot control the language of the keyboard. The user chooses which keyboards they would like available via the settings application and can toggle between them using the globe icon on the keyboard. When the keyboard is opened it will open to the most recently used keyboard.

Here is what you need my friend,

[textView setKeyboardType:UIKeyboardTypeNumberPad];

[txtField setKeyboardType:UIKeyboardTypeNumberPad];


来源:https://stackoverflow.com/questions/7319706/change-keyboard-language-in-ios-app-when-click-in-uitextfield

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!