Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone keyboard layout for negative numbers?

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!

like image 553
lambdabunny Avatar asked May 28 '09 14:05

lambdabunny


2 Answers

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

like image 155
james_womack Avatar answered Nov 18 '22 15:11

james_womack


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.

like image 20
Jason Avatar answered Nov 18 '22 13:11

Jason