DTMutableCoreTextLayoutFrame Class Reference
| Inherits from | DTCoreTextLayoutFrame : NSObject |
| Declared in | DTMutableCoreTextLayoutFrame.h |
Instance Methods
initWithFrame:attributedString:
Default initializer.
- (id)initWithFrame:(CGRect)frame attributedString:(NSAttributedString *)attributedStringParameters
- frame
The frame that is available for text
- attributedString
The attributed string to fill the receiver with
Return Value
An initialized mutable layout frame
Declared In
DTMutableCoreTextLayoutFrame.hrelayoutText
Re-layouts the text contents of the receiver and adjusts the frame to match the contents
- (void)relayoutTextDeclared In
DTMutableCoreTextLayoutFrame.hrelayoutTextInRange:
Relayouts the text in the given string range
- (void)relayoutTextInRange:(NSRange)rangeParameters
- range
The string range to redo layout for
Discussion
Note: This method might be defunct as all incremental layouting uses replaceTextRange:withText:directRect: at present.
Declared In
DTMutableCoreTextLayoutFrame.hreplaceTextInRange:withText:dirtyRect:
Replaces the attributed text in the given range with new text and optionally returns the dirty rectangle this change has caused.
- (void)replaceTextInRange:(NSRange)range withText:(NSAttributedString *)text dirtyRect:(CGRect *)dirtyRectParameters
- range
The string range to replace
- text
The text to replace the range with
- dirtyRect
Output param to receive the dirtyRect or
NULLif this is not required
Declared In
DTMutableCoreTextLayoutFrame.hsetAttributedString:
Replaces the text contents of the receiver
- (void)setAttributedString:(NSAttributedString *)attributedStringParameters
- attributedString
The new attributed string
Declared In
DTMutableCoreTextLayoutFrame.hsetFrame:
Modifies the text frame of the receiver.
- (void)setFrame:(CGRect)frameParameters
- frame
The new frame
Discussion
Set shouldRebuildLines to NO to avoid relayouting text on a frame change
Declared In
DTMutableCoreTextLayoutFrame.h