私は自分のコードにこれを持っています:
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    NSString *currency = [defaults objectForKey:@"currencySymbol"];
    NSString *text = [textField.text stringByReplacingCharactersInRange:range withString:string];
    text = [text stringByReplacingOccurrencesOfString:@"." withString:@""];
    text = [text stringByReplacingOccurrencesOfString:currencySymbol withString:@""];
    NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
    [numberFormatter setNumberStyle: NSNumberFormatterCurrencyStyle];
    [numberFormatter setCurrencySymbol:currency];
    NSNumber *number = [NSNumber numberWithDouble:[text intValue]*0.01];
    text = [numberFormatter stringFromNumber:number];
    textField.text = text;
一定の量に達するまではうまく機能しますが、それ以上になることはありません。たとえば、次のようになります。
- 2,500.00(可能)
- 25,000.00 (それは不可能です)
多分それはばかげたことだと思います。
ありがとう。
同じ問題を抱えている人のために、次のコード行を追加する必要があります。
text = [text stringByReplacingOccurrencesOfString:@"," withString:@""];
(論理的に) は,数千に使用されるため...