May 2003
Intermediate to advanced
566 pages
27h 29m
English
NSFormatter — Mac OS X 10.0
This class declares an abstract interface for objects that an
instance of NSCell can use to create, interpret,
and validate a textual representation of the
cell’s contents that is suited for human
readability. The Foundation framework provides two concrete classes
that are used to format numeric and time and date values:
NSNumberFormatter and
NSDateFormatter.
|
|
@interface NSFormatter : NSObject <NSCoding, NSCopying>
|
// Instance Methods
|
- (NSAttributedString *)attributedStringForObjectValue:(id)obj withDefaultAttributes:(NSDictionary *)attrs; |
- (NSString *)editingStringForObjectValue:(id)obj; |
- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string errorDescription:(NSString **)error; |
- (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error; |
- (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr originalString:(NSString *)origString originalSelectedRange:(NSRange)origSelRange errorDescription:(NSString **)error; |
- (NSString *)stringForObjectValue:(id)obj; |
// Methods Implementing NSCoding
|
- (void)encodeWithCoder:(NSCoder *)aCoder; |
- (id)initWithCoder:(NSCoder *)aDecoder; |
// Methods Implementing NSCopying
|
- (id)copyWithZone:(NSZone *)zone; |
NSDateFormatter, NSNumberFormatter ...
Read now
Unlock full access