views:

650

answers:

4

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!

A: 

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

Alexandre L Telles
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. :)
lambdabunny
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.
Alexandre L Telles
A: 

Just a thought, maybe you could add a bar above the number keyboard that kinda looks like it fits?

Dolphin
+1  A: 

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.

Jason
Either that, or you can just create a custom keyboard manually.
James Skidmore
@jason: Thats how I would do it
Daniel Kindler
+1  A: 

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

Cirrostratus