The problem is the use of floatValue
to convert the formatted number text to a number. floatValue
only works as expected if the text is unformatted (no commas) and uses the period for the decimal separator.
Since you store a formatted number in the field, it only works with small numbers and in certain locales.
Replace your use of floatValue
on the text with the same NSNumberFormatter
used to format the number. Use it to parse the text and give you an NSNumber
(which you can then call floatValue
on).