【发布时间】:2013-07-27 19:04:45
【问题描述】:
我正在寻找可以显示 NSLocale 货币格式的代码。
我使用了下面的代码
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init] ;
[formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[formatter setLocale:skProduct.priceLocale];
NSLog(@"formatter%@",formatter);
NSLog(@"%@",skProduct.priceLocale); //// i want to print NSLocale value
NSString* currencyString = [formatter stringFromNumber:skProduct.price];
NSLog(@"currencyString price %@",currencyString);
如何根据 NSLocale 显示确切的价格金额,当我尝试 NSLog(@"%@",skProduct.priceLocale);它显示像一些内存位置.. 请帮帮我
【问题讨论】:
标签: ios objective-c currency nslocale