NSAttributedString

Dok-tips for Foundation class NSMutableString

Immutable

Effectively has a "dictionary" for each character - not actually, but effectively. You get this dictionary by calling:

- (NSDictionary *)attributesAtIndex:(NSUInteger)index effectiveRange:(NSRangePointer)range;

Note: it does NOT inherit from NSString. You can however convert an NSAtributedString into an NSString by calling its string method as in

NSRange r = [[attributedString string] rangeOfString:substring];

Where the range is returned via the NSRangePointer variable to indicate how far from the index the attributes are identical

History

New for iOS 6


List of all foundation classes