iPhone keyboard layout for negative numbers?
Asked Answered
R

3

7

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?

Thanks!

Riant answered 28/5, 2009 at 14:28 Comment(0)
G
3

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

Update The Squarespace link is now broken. Another option is: https://github.com/lnafziger/Numberpad

Groomsman answered 1/2, 2010 at 0:46 Comment(0)
Z
2

How about placing a "+/-" button next to your UITextView that would switch the sign of the entered text? Or a "+" button that appears to the left of it that switches the button label from "+" to "-" each time you tap it.

Zelma answered 28/5, 2009 at 21:57 Comment(2)
Either that, or you can just create a custom keyboard manually.Transfigure
@jason: Thats how I would do itFusty
P
0

You don't have to jailbreak. If you create a view to simulate the keyboard you're still following the SDK rules.

Phobos answered 28/5, 2009 at 14:37 Comment(2)
I realize that, but unfortunately have no time to implement a full keyboard sim either. Looking for either an existing sdk keyboard view that i just somehow missed, or a library someone else put together that i could reuse. :)Riant
Don't think there is one yet. There are a few custom keyboards on the App Store, but I haven't seen any component to make it easier.Phobos

© 2022 - 2024 — McMap. All rights reserved.