You have to set NSNumberFormatterCurrencyStyle
instead of NSNumberFormatterDecimalStyle
and CurrencySymbol
to Empty to remove the symbol of Currency.
Working Code :
NSNumberFormatter *currencyFormatter = [[NSNumberFormatter alloc] init];
[currencyFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[currencyFormatter setCurrencySymbol:@""];
[currencyFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"es_ES"]];
NSLog(@"Final Value :: %@", [currencyFormatter stringFromNumber:[NSNumber numberWithFloat:1000000]]);
Output (As you want without Currency Symbol) :
Final Value :: 1.000.000,00