iPad数字键盘 [英] iPad numeric keyboard

查看:223
本文介绍了iPad数字键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图在iPad上安装一个数字键盘,但是当我在TextField上设置数字键盘时,我得到一个带有数字和ponctuation的普通键盘。但是我在模拟器上发现了几个错误,我真的不知道这是不是另一个。

I've been trying to get a numeric keypad on the iPad, but when I set a numeric pad on a TextField, I get a normal keyboard with numbers and ponctuation. But I found out several bugs on the simulator, I don't really know if this is another.

iPad上是否有标准键盘?

Is there a standard keypad on the iPad?

推荐答案

iPad的数字键盘正是你所看到的。没有iPhone相同的数字只有垫。我已经解决过这只是在我的应用程序中使用UIButtons和自定义代码, Nippon 。我还创建了一个背景敌人按钮。它的大小适合模态视图控制器,带有 UIModalPresentationFormSheet 样式。

The iPad's "number' keyboard is exactly what you're seeing. There is no "iPhone identical" number only pad. I've worked around this by just using UIButtons and custom code in my app, Nippon. I've also created a background foe the button. It's sized for a modal view controller with the UIModalPresentationFormSheet style.

以下是图像,以防万一你想使用它们:

Here are the images, in case you want to use them:


对于代码,强制UITextField隐藏键盘,然后在按钮处于预设状态时手动更新值sed。

As for code, you force the UITextField to hide the keyboard and then you manually update the value when the button is pressed.

这篇关于iPad数字键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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