DTTextRange Class Reference
| Inherits from | UITextRange |
| Conforms to | NSCopying |
| Declared in | DTTextRange.h |
Overview
This class represents a range of text in an DTRichTextEditorView. It is a concrete subclass of UITextRange.
A range is considered empty if start is equal to end because the length generally does not include the ending character, similar to a caret being position on the index of the ending character.
Tasks
Creating Text Ranges
-
+ textRangeFromStart:toEnd: -
+ emptyRangeAtPosition:offset: -
+ emptyRangeAtPosition: -
+ rangeWithNSRange:
Getting Information about Text Ranges
Class Methods
emptyRangeAtPosition:
Creates an empty text range with position.
+ (DTTextRange *)emptyRangeAtPosition:(UITextPosition *)positionParameters
- position
Return Value
The new text range
Declared In
DTTextRange.hemptyRangeAtPosition:offset:
Creates an empty text range with position.
+ (DTTextRange *)emptyRangeAtPosition:(UITextPosition *)position offset:(NSInteger)offsetReturn Value
The new text range
Declared In
DTTextRange.hrangeWithNSRange:
Creates a text range from an NSRange.
+ (DTTextRange *)rangeWithNSRange:(NSRange)rangeParameters
- range
The NSRange to convert to a DTTextRange
Return Value
The new text range
Declared In
DTTextRange.htextRangeFromStart:toEnd:
Convenience method to create a text range from a start and end position
+ (DTTextRange *)textRangeFromStart:(UITextPosition *)start toEnd:(UITextPosition *)endParameters
- start
The starting position
- end
The ending position
Return Value
A text range with those positions as end points
Declared In
DTTextRange.h