NSNumberFormatter的maximumFractionDigits和maximumSignificantDigits错误

这是一个错误,当在iOS 8上NSNumberForamtter一起使用maximumFractionDigitsmaximumSignificantDigits

 NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; formatter.maximumFractionDigits = 2; formatter.maximumSignificantDigits = 3; NSLog(@"%@", [formatter stringFromNumber:@(0.3333)]); // output 0.333 expected 0.33 

它工作正常,如果我只使用maximumFractionDigits

 NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; formatter.maximumFractionDigits = 2; NSLog(@"%@", [formatter stringFromNumber:@(0.3333)]); // output expected .33