Initializer

init(amount:currencyCode:)

Initializes a currency amount object with the specified values.

Declaration

init(amount: NSDecimalNumber, currencyCode: String)

Parameters

amount

The decimal number representing the amount of money.

currencyCode

The ISO 4217 currency code to apply to the specified amount. You can get a list of possible currency codes using the isoCurrencyCodes method of NSLocale. For example, the string “USD” corresponds to United States dollars.

Return Value

An initialized currency amount object or nil if the object could not be created.