NSAttributedString(DTRichText) Category Reference
Declared in | NSAttributedString+DTRichText.h |
Class Methods
attributedStringWithImage:maxDisplaySize:
Create an attributed string with text attachment for an image.
+ (NSAttributedString *)attributedStringWithImage:(UIImage *)image maxDisplaySize:(CGSize)maxDisplaySize
Parameters
- image
The image to embed in the attributed string
- maxDisplaySize
The maximum display size to allow for the embedded image
Discussion
The maximum display size can be limited to a reasonable size.
Declared In
NSAttributedString+DTRichText.h
Instance Methods
typingAttributesForRange:
Retrieves the attributes that are used if typing starts at this position.
- (NSDictionary *)typingAttributesForRange:(NSRange)range
Parameters
- range
The string range to query
Return Value
A dictionary of CoreText attributes suitable for creating an attributed string to insert
Declared In
NSAttributedString+DTRichText.h