xcode - iPhone: How can I add a currency symbol, decimal point and decimal places in shouldChangeCharactersInRange -
I have found the code given below, which should I am trying to work in UITableView ChangeCharactersInRange event without currency symbol It works fine.
When I try to add the currency symbol, it allows me to enter a number. What should I do, say that I enter 7536, it should be £ 0.07, £ 0.75, £ 7.53, £ 75.36, but instead it is £ 0.07, £ 0.05, £ 0.03, £ 0.06
It looks likethis is the code.
}
[@ "Pound 1.23" Double Values]
0. If there is a major currency symbol, then you have to leave:
NSString * currentText = textField.text; NSRange category = [current text limitoffstring: strCurrencySymbol]; If (range.location == 0) {currentText = [current text substringsfind index: range.length]; } Double current values = [current text doublewela]; Generally, I would recommend doing stuff like this: - It will not work with all input methods (and IIRC should not change the cursor in the order of order: it is not) Is called for).
- Unless you work in the cash register (where they have a "00" key because otherwise "$ 100.00" is a pain) I want to be able to enter "$ 1" and mean $ 1.00 I'm
- It's not localized.
Comments
Post a Comment