I want to change my NSNumberformatter from displaying negative numbers with parenthesis around them to putting the minus sign in front (or whatever the localized standard is).
I would assume I could do this with setNegativeFormat:
but reading Apple's oh so thorough docs I am left scratching my head:
setNegativeFormat:
Sets the format the receiver uses to display negative values.
- (void)setNegativeFormat:(NSString *)aFormat
Parameters aFormat A string that specifies the format for negative values.
Availability Available in iPhone OS 2.0 and later.
See Also – negativeFormat
Declared In NSNumberFormatter.h
what are my options for aFormat?!? C'mon Doc Writers, would a link here kill you?
edit: for what it's worth here's the declaration:
NSNumberFormatter *currencyFormatter = [[NSNumberFormatter alloc] init];
[currencyFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
It's important for me to retain the localized currency symbol & decimal places whatever they may be. So [currencyFormatter setNegativeFormat:@"-#,##0.00"] probably won't work as currency is missing and 2 decimals can't be assumed for all currencies.