NSNumberFormatter *frm = [[NSNumberFormatter alloc] init];
[frm setNumberStyle:NSNumberFormatterCurrencyStyle];
[frm setCurrencySymbol:@"$"];
[frm setMaximumFractionDigits:2];
NSString *formatted = [frm stringFromNumber:[NSNumber numberWithInt:100000]];
No comments:
Post a Comment