Sacha
Sacha

Reputation: 180

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?

Upvotes: 8

Views: 4395

Answers (1)

Terry Wilcox
Terry Wilcox

Reputation: 9040

After you set the currency style, try

[currencyFormatter setMaximumFractionDigits:0];

You may need to set the rounding mode as well.

Upvotes: 31

Related Questions