Instance Method

replaceCharactersInRange:withAttributedString:

Replaces the characters and attributes in a given range with the characters and attributes of the given attributed string.

Declaration

- (void)replaceCharactersInRange:(NSRange)range withAttributedString:(NSAttributedString *)attrString;

Parameters

aRange

The range of characters and attributes replaced.

attributedString

The attributed string whose characters and attributes replace those in the specified range.

Discussion

Raises an NSRangeException if any part of aRange lies beyond the end of the receiver’s characters.

See Also

Changing characters and attributes

- appendAttributedString:

Adds the characters and attributes of a given attributed string to the end of the receiver.

- insertAttributedString:atIndex:

Inserts the characters and attributes of the given attributed string into the receiver at the given index.

- setAttributedString:

Replaces the receiver’s entire contents with the characters and attributes of the given attributed string.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software