获取iOS中支持的货币列表

时间:2012-10-17 13:27:17

标签: objective-c ios localization

我需要显示货币列表,以便用户可以选择一个。我想要包含iOS支持的所有货币。

iOS中是否有办法获取所有支持货币的代码和名称?

提前致谢!

2 个答案:

答案 0 :(得分:8)

你在这里:

NSLocale *locale = [NSLocale currentLocale];
for (NSString *code in [NSLocale ISOCurrencyCodes]) {
    NSLog(@"%@ : %@", code, [locale displayNameForKey:NSLocaleCurrencyCode value:code]);
}

答案 1 :(得分:2)

雨燕5

let currencys = Locale.isoCurrencyCodes

所有唯一货币的数组:

let list = ["AED - AED","AFN - ؋","ALL - ALL","AMD - ֏","ANG - ANG","AOA - Kz","ARS - $","AUD - $","AWG - AWG","AZN - ₼","BAM - KM","BBD - BBD","BDT - ৳","BGN - BGN","BHD - د.ب.‏","BIF - FBu","BMD - $","BND - $","BOB - Bs","BRL - R$","BSD - $","BTN - Nu.","BWP - P","BYN - Br","BZD - $","CAD - CA$","CDF - FC","CHF - CHF","CLP - $","CNY - ¥","COP - $","CRC - ₡","CUP - $","CVE - ​","CZK - CZK","DJF - Fdj","DKK - DKK","DOP - RD$","DZD - DA","EGP - ج.م.‏","ERN - Nfk","ETB - Br","EUR - €","FJD - $","FKP - FKP","GBP - £","GEL - ₾","GHS - GH₵","GIP - £","GMD - GMD","GNF - GNF","GTQ - Q","GYD - GYD","HKD - HK$","HNL - L","HRK - HRK","HTG - HTG","HUF - Ft","IDR - Rp","ILS - ₪","INR - ₹","IQD - د.ع.‏","IRR - ریال","ISK - ISK","JMD - $","JOD - د.أ.‏","JPY - ¥","KES - Ksh","KGS - сом","KHR - ៛","KMF - CF","KPW - KPW","KRW - ₩","KWD - د.ك.‏","KYD - KYD","KZT - ₸","LAK - ₭","LBP - ل.ل.‏","LKR - රු.","LRD - $","LYD - د.ل.‏","MAD - MAD","MDL - L","MGA - Ar","MKD - ден","MMK - K","MNT - ₮","MOP - MOP$","MRU - أ.م.","MUR - Rs","MVR - ރ.","MWK - MK","MXN - $","MYR - RM","MZN - MTn","NAD - $","NGN - ₦","NIO - C$","NOK - NOK","NPR - नेरू","NZD - $","OMR - ر.ع.‏","PAB - B/.","PEN - S/","PGK - K","PHP - ₱","PKR - ر","PLN - zł","PYG - Gs.","QAR - ر.ق.‏","RON - RON","RSD - RSD","RUB - RUB","RWF - RF","SAR - ر.س.‏","SBD - $","SCR - SR","SDG - ج.س.","SEK - kr","SGD - $","SHP - £","SLL - SLL","SOS - S","SRD - SRD","SSP - £","STN - Db","SYP - LS","SZL - E","THB - ฿","TJS - сом.","TMT - TMT","TND - DT","TOP - T$","TRY - ₺","TTD - TTD","TWD - $","TZS - TSh","UAH - UAH","UGX - USh","USD - $","UYU - $","UZS - soʻm","VND - ₫","VUV - VT","WST - WS$","XAF - FCFA","XCD - $","XOF - CFA","XPF - FCFP","YER - ر.ي.‏","ZAR - R","ZMW - K"]