我想在UIAlertview中为文本字段添加格式货币。但是,我对此没有任何解决方案。如果你知道解决方案,你能帮助我吗?
由于
答案 0 :(得分:1)
NSNumberFormatter *formatter = [NSNumberFormatter new];
formatter.numberStyle = NSNumberFormatterCurrencyStyle;
NSString *cash = [formatter stringFromNumber:@5];
[[[UIAlertView alloc] initWithTitle:cash message:cash delegate:self cancelButtonTitle:nil otherButtonTitles:nil ] show];