let number: Double = 1234.56
let formatter = NumberFormatter()
formatter.numberStyle = .currency
formatter.locale = Locale.current
if let formattedString = formatter.string(from: NSNumber(value: number)) {
print(formattedString)
}
Output: ¤1,234.56