title: NSNumberFormatter to show a maximum of 3 digits
body: <p>I would like to make it so one of my UILabels only shows a maximum of 3 digits. So, if the associated value is 3.224789, I'd like to see 3.22. If the value is 12.563, I'd like to see 12.5 and if the value is 298.38912 then I'd like to see 298. I've been trying to use NSNumberFormatter to accomplish this, but when I set the maximum significant digits to 3 it always has 3 digits after the decimal place. Here's the code:</p>
  
  <pre><code>NSNumberFormatter *distanceFormatter = [[[NSNumberFormatter alloc] init] autorelease];
  [distanceFormatter setNumberStyle:NSNumberFormatterDecimalStyle];
  [distanceFormatter setAlwaysShowsDecimalSeparator:NO];
  [distanceFormatter setMaximumSignificantDigits:3];
  </code></pre>
  
  <p>I always thought 'significant digits' meant all the digits, before and after the decimal point. Anyway, is there a way of accomplishing this using NSNumberFormatter?</p>
  
  <p>Thanks!</p>