iPhone键盘布局为负数? [英] iPhone keyboard layout for negative numbers?
问题描述
我的用户需要输入纬度和经度,当然我需要验证输入的值是否是合法的纬度/经度值。我想要一个键盘布局,为我做一些(消除字母字符,标点符号等,只留下数字和+/-)。数字键盘键盘似乎没有这样做(缺少+/-),也没有随SDK附带的任何其他键盘布局。有没有人知道是否有办法提供这种能力而不用我自己的键盘IME和越狱手机?
My users need to enter latitude and longitude, and of course I need to verify that the values entered are legitimate lat/long value. I'd like to have a keyboard layout that does some of this for me (eliminating alphabetic characters, punctuation, etc, and leaving only the numbers and +/-). The number pad keyboard doesn't seem to do it (missing +/-) and neither do any other keyboard layouts that come with the SDK. Does anyone know if there is a way to provide that capability without doing my own keyboard IME and jailbreaking the phone?
谢谢!
推荐答案
我知道答案是迟到的,但这个话题仍然与我有关。因此,我希望以下内容可以帮助遇到此页面的人。
I know this is answer is way late, but this topic was still relevant to me. Therefore I have hope the following will help someone who comes across this page.
Bryan S. Gruver发布了一个完整的Xcode项目,lambdabunny可以稍微修改以实现他们的目标。你可以在这里找到它:
http://brygruver.squarespace.com/blog/2009/10/1/creating-a-custom-number-pad.html
Bryan S. Gruver posted a full Xcode project that lambdabunny could modify ever so slightly in order to achieve their aim. You can find it here: http://brygruver.squarespace.com/blog/2009/10/1/creating-a-custom-number-pad.html
更新
Squarespace链接现已断开。另一种选择是:
https://github.com/lnafziger/Numberpad
这篇关于iPhone键盘布局为负数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!