NSMutableAttributedString

NSMutableAttributedString Mac OS X 10.0

NSMutableAttributedString is a subclass of NSAttributedString that allows the contents and attributes of the string to be altered after the object has been initialized, which is normally not possible with its immutable superclass.

figs/cocn_1358.gif

@interface NSMutableAttributedString : NSAttributedString
 // Accessor Methods
   - (void)setAttributes:(NSDictionary *)attrs range:(NSRange)range;
   - (void)setAlignment:(NSTextAlignment)alignment range:(NSRange)range;
   - (void)setAttributedString:(NSAttributedString *)attrString;
 // Instance Methods
   - (void)appendAttributedString:(NSAttributedString *)attrString;
   - (void)addAttribute:(NSString *)name value:(id)value range:(NSRange)range;
   - (void)addAttributes:(NSDictionary *)attrs range:(NSRange)range;
   - (void)applyFontTraits:(NSFontTraitMask)traitMask range:(NSRange)range;
   - (void)beginEditing;
   - (void)deleteCharactersInRange:(NSRange)range;
   - (void)endEditing;
   - (void)fixAttachmentAttributeInRange:(NSRange)range;
   - (void)fixAttributesInRange:(NSRange)range;
   - (void)fixFontAttributeInRange:(NSRange)range;
   - (void)fixParagraphStyleAttributeInRange:(NSRange)range;
   - (void)insertAttributedString:(NSAttributedString *)attrString atIndex:(unsigned)loc;
   - (NSMutableString *)mutableString;
   - (BOOL)readFromURL:(NSURL *)url options:(NSDictionary *)options documentAttributes:(NSDictionary **)dict;
   - (void)removeAttribute:(NSString *)name range:(NSRange)range;
   - (void)replaceCharactersInRange:(NSRange)range withAttributedString:(NSAttributedString *)attrString;
   - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str;
   - (void)subscriptRange:(NSRange)range;
   - (void)superscriptRange:(NSRange)range;
   - (void)unscriptRange:(NSRange)range;
   - (void)updateAttachmentsFromPath:(NSString *)path;

Subclasses

NSTextStorage



    Part II: API Quick Reference
    Chapter 13. Foundation Classes