Skip to content

Instantly share code, notes, and snippets.

@raylillywhite
Created February 19, 2013 06:35
Show Gist options
  • Save raylillywhite/4983594 to your computer and use it in GitHub Desktop.
Save raylillywhite/4983594 to your computer and use it in GitHub Desktop.
NSNumberFormatter *currencyFormatter = [[NSNumberFormatter alloc] init];
[currencyFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[currencyFormatter setCurrencyCode:currencyCode];
[currencyFormatter setMaximumFractionDigits:0];
[currencyFormatter setRoundingMode:NSNumberFormatterRoundHalfUp];
return [currencyFormatter stringFromNumber:@(amount)];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment