Sunday, July 31, 2016

Get currency symbols from currency ISO-code in IOS app


Get device local currency symbols  for iOS applications.Flowing:-



NSString *currencyCode = @"EUR";
NSNumberFormatter * formatter = [NSNumberFormatter new];
formatter.numberStyle = NSNumberFormatterCurrencyStyle;

NSString * localeIde = [NSLocale localeIdentifierFromComponents:@{NSLocaleCurrencyCode: currencyCode}];
formatter.locale = [NSLocale localeWithLocaleIdentifier:localeIde];

NSString * symbol = formatter.currencySymbol;

0 comments :

Post a Comment

 

Copyright @ 2014 Tech Tutorial .