Get currency symbols from currency code with swift
问题 How can I get the currency symbols for the corresponding currency code with Swift (macOS). Example: EUR = €1.00 USD = $1.00 CAD = $1.00 GBP = £1.00 My code: var formatter = NSNumberFormatter() formatter.currencySymbol = getSymbol(currencyCode) formatter.numberStyle = NSNumberFormatterStyle.CurrencyStyle let number = NSNumber(double: (amount as NSString).doubleValue) let amountWithSymbol = formatter.stringFromNumber(number)! getSymbol(_ currencyCode: String) -> String or.. is there a better