title: How to truncate .000 zeros from double with NSNumberFormatter
body: <p>Ok so if I have a double to begin with how do I limit it or truncate digits to 1dp since I know they're not needed to be viewed</p>
  
  <pre><code>double a = 1.6;
  
  NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
  NSString *numberAsString = [numberFormatter stringFromNumber:[NSNumber numberWithDouble:a]];
  
  [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle];
  [numberFormatter setGeneratesDecimalNumbers:YES];
  [numberFormatter setMaximumFractionDigits:1];
  [numberFormatter setMinimumFractionDigits:1];
  [numberFormatter setAlwaysShowsDecimalSeparator:YES];  
  
  NSLog(@"a raw: %f", a); //outputs 1.600000
  
  myLabel.text = [NSString stringWithFormat:@"%@",numberAsString];
  
  NSLog(@"Formatted a: %@", numberAsString); //outputs 2
  
  [numberFormatter release];
  </code></pre>
  
  <p>So the problem is it rounds the value and leaves no decimal place, I'm trying to get it to output just 1.6 for myLabel.</p>