如何将本地货币符号添加到Buy-Button https://github.com/ebutterfly/EBPurchase
[buyButton setTitle:[@"Buy Game Levels Pack " stringByAppendingString:productPrice] forState:UIControlStateNormal];
答案 0 :(得分:7)
以下代码将起作用:
SKProduct *product = ebp.validProduct; // epb is the EBPurchase object
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[numberFormatter setLocale:product.priceLocale];
NSString *formattedPrice = [numberFormatter stringFromNumber:product.price];
formattedPrice
将具有相应的货币格式。
您还应该使用localizedTitle
中的localizedDescription
和product
作为产品的标题和说明。这些都是您在iTunes Connect中设置的数据获得的。