I have a UITextField with number pad keyboard and on Editing Changed event I do this:
textField.text = [@"" stringByAppendingFormat:@"%0.2f", [[[textField text] stringByReplacingOccurrencesOfString:@"." withString:@""] floatValue]/100.0];
This is a script found on a site and it works just fine for the first 11 characters, meaning that if I type 10000000000 it displays correctly: 100000000.00
The problem come from the 12th character.
If I press again 0, it displays 999999979.52
And again 0 in shows 9999999959.04
Is it something related with the float size?