0

I am trying to force the currency formatter to only show specific country currency symbol.

let formatter = NumberFormatter()
formatter.numberStyle = .currency
formatter.string(from: cost as NSNumber)

How to force currency formatter to specific country symbol ?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Karen
  • 169
  • 1
  • 16
  • Have you reviewed the documentation for `NumberFormatter`? There are several currency related properties. – rmaddy Feb 05 '18 at 17:51
  • `NumberFormatter` objects have a property `currencySymbol`. You could set your `NumberFormatter`'s `currencySymbol` to your desired symbol as the last step in configuring your number formatter and it should override the default symbol for your locale. – Duncan C Feb 05 '18 at 18:35

0 Answers0