开发者

iPad numeric keyboard

开发者 https://www.devze.com 2022-12-26 19:37 出处:网络
I\'ve been trying to get a numeric keypad on the iPad, but when I set a numeric pad 开发者_JAVA百科on a TextField, I get a normal keyboard with numbers and ponctuation. But I found out several bugs on

I've been trying to get a numeric keypad on the iPad, but when I set a numeric pad 开发者_JAVA百科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.

Is there a standard keypad on the iPad?


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:

iPad numeric keyboard

iPad numeric keyboard

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

0

精彩评论

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