单击 UITextField 时更改 iOS 应用程序中的键盘语言 [英] Change Keyboard Language In iOS App When Click In UITextField

查看:89
本文介绍了单击 UITextField 时更改 iOS 应用程序中的键盘语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了很多方法来以编程方式更改 ipad 中的键盘,但它根本没有改变.我在 uitext 中找不到任何用于执行此操作的属性.

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.

有什么想法吗?

推荐答案

很遗憾,您无法控制键盘的语言.用户可以通过设置应用程序选择他们希望使用的键盘,并可以使用键盘上的地球图标在它们之间切换.当键盘打开时,它将打开最近使用的键盘.

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];

这篇关于单击 UITextField 时更改 iOS 应用程序中的键盘语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆