2
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[numberFormatter setLocale:product.priceLocale];
NSString *localizedMoneyString = [numberFormatter stringFromNumber:product.price];
[numberFormatter release];
結果:€0.89
預期結果:0,89€
NSNumberFormatter錯誤的結果
無論setFormatterBehavior
值的結果是一樣的。
使用區域設置 - 'en_BG @ currency = EUR',預期結果是'0.89€' – h4cky 2013-03-04 12:14:59
但是爲什麼貨幣符號不是在價格之後? – h4cky 2013-03-04 12:17:32
使用此語言環境查看應用商店中的價格標籤 - 價格格式必須相同。 – pcholberg 2013-03-04 12:18:37