Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSNumberFormatterCurrencyStyle number formatter without decimal digits

I want a price rounded up to be displayed as a currency without digits after the decimal symbol. Without the currency style there is no problem. Is the currency style overriding other properties I set?

like image 831
Sacha Avatar asked Apr 11 '11 14:04

Sacha


1 Answers

After you set the currency style, try

[currencyFormatter setMaximumFractionDigits:0];

You may need to set the rounding mode as well.

like image 114
Terry Wilcox Avatar answered Nov 15 '22 19:11

Terry Wilcox