I'm writing an iPhone app that has a textField for the user to enter a "dollar amount" like 12.34
None of the SDK keyboards seem to have a decimal point. (OR do they?) So I decided to just let the user type in "1234" and I would add the decimal point for him... as he types.... by using EDITING CHANGED.
But each time my code adds the decimal point... it generates ANOTHER "EDITING CHANGED" event... and causes an endless loop.
Or is there an easier way to do all of the above?
I think it would be good to point out that as of the new SDK you can use the new UIKeyboardTypeDecimalPad
.
So now you just have to:
myTextField.keyboardType=UIKeyboardTypeDecimalPad;
Please post your request as a bug in the iPhone Developer Portal. Apple will not add a new keyboard type that is simply numbers with the decimal separator until they hear from a large number of developers who need one...
-t
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With