ios - SetDecimalSeparator Doesn't work in real device -
i have uitextfield code bellow, values , transform in money format:
nsnumberformatter *numberformatter = [[nsnumberformatter alloc] init]; [numberformatter setnumberstyle:nsnumberformattercurrencystyle]; [numberformatter setcurrencysymbol:@"$"]; [numberformatter setmaximumfractiondigits:2]; [numberformatter setminimumfractiondigits:2];
this code works well, when try change decimal separator (comma ',') (point '.') command:
[numberformatter setdecimalseparator:@"."];
my textfield continues showing comma separator time can not edit textfield, how can solve problem?
edit
in ipad simulator code works well, when put code in real ipad (language brazil) code not work!
i spotted same issue. seems nsnumberformatter nsnumberformattercurrencystyle style ignores decimalseparator settings. had change nsnumberformatterdecimalstyle in order set own decimalseparator.
Comments
Post a Comment