NSNumberFormatter with comma decimal separator
I would recommend not hardcoding the separator to ensure the right separator behavior based on the iPhone locale setting. The easiest way to to this is: using objective-c NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc]init]; numberFormatter.locale = [NSLocale currentLocale];// this ensures the right separator behavior numberFormatter.numberStyle = NSNumberFormatterDecimalStyle; numberFormatter.usesGroupingSeparator = YES; // example for writing the number … Read more