O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSNumberFormatter — Mac OS X 10.0

Synopsis

This concrete subclass of NSFormatter converts the numeric contents of a cell into a user-specified textual representation; textual representations can also be converted to NSDecimalNumber objects used to store numeric cell values.

image with no caption

@interface NSNumberFormatter : NSFormatter
                                  // Accessor Methods
   - (void)setAttributedStringForNil:(NSAttributedString *)newAttributedString;
   - (NSAttributedString *)attributedStringForNil;
   - (void)setNegativeFormat:(NSString *)format;
   - (NSString *)negativeFormat;
   - (void)setMaximum:(NSDecimalNumber *)aMaximum;
   - (NSDecimalNumber *)maximum;
   - (void)setAllowsFloats:(BOOL)flag;
   - (BOOL)allowsFloats;
   - (void)setPositiveFormat:(NSString *)format;
   - (NSString *)positiveFormat;
   - (void)setMinimum:(NSDecimalNumber *)aMinimum;
   - (NSDecimalNumber *)minimum;
   - (void)setAttributedStringForZero:(NSAttributedString *)newAttributedString;
   - (NSAttributedString *)attributedStringForZero;
   - (void)setRoundingBehavior:(NSDecimalNumberHandler *)newRoundingBehavior;
   - (NSDecimalNumberHandler *)roundingBehavior;
   - (void)setFormat:(NSString *)format;
   - (NSString *)format;
   - (void)setHasThousandSeparators:(BOOL)flag;
   - (BOOL)hasThousandSeparators;
   - (void)setLocalizesFormat:(BOOL)flag;
   - (BOOL)localizesFormat;
   - (void)setDecimalSeparator:(NSString *)newSeparator;
 - (NSString *) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required