I am trying to format a NSNumber containing a value of 0.305 as "30.5%".
However, my following code does not work:
[numberFormatter setNumberStyle:NSNumberFormatterPercentStyle];
[numberFormatter setLocale:[NSLocale currentLocale]];
How can I specify that the number should be formatted as percentage with one decimal place?
Edited for the actual correct answer:
[numberFormatter setNumberStyle:NSNumberFormatterPercentStyle];
[numberFormatter setMinimumFractionDigits:1];