DTAttributedTextCell Class Reference
| Inherits from | UITableViewCell |
| Declared in | DTAttributedTextCell.h |
Tasks
Creating Cells
Setting Attributed Content
-
attributedStringproperty -
textDelegateproperty -
– setHTMLString: -
– setHTMLString:options:
Getting Information
-
– requiredRowHeightInTableView: -
hasFixedRowHeightproperty -
attributedTextContextViewproperty
Properties
attributedString
The attributed string content of the receiver
@property (nonatomic, strong) NSAttributedString *attributedStringDeclared In
DTAttributedTextCell.hattributedTextContextView
The attributed text content view that the receiver uses to display the attributed text content.
@property (nonatomic, readonly) DTAttributedTextContentView *attributedTextContextViewDeclared In
DTAttributedTextCell.hhasFixedRowHeight
Determines whether the cells built-in contentView is allowed to dictate the size available for text. If active then attributedTextContextView’s height always matches the cell height.
@property (nonatomic, assign) BOOL hasFixedRowHeightDiscussion
Set this to YES for use in fixed row height table views, leave it NO for flexible row height table views.
Declared In
DTAttributedTextCell.htextDelegate
A delegate implementing DTAttributedTextContentViewDelegate to provide custom subviews for images and links.
@property (nonatomic, DT_WEAK_PROPERTY) IBOutlet id<DTAttributedTextContentViewDelegate> textDelegateDeclared In
DTAttributedTextCell.hInstance Methods
initWithReuseIdentifier:
Creates a tableview cell with a given reuse identifier.
- (id)initWithReuseIdentifier:(NSString *)reuseIdentifierParameters
- reuseIdentifier
The reuse identifier to use for the cell
Return Value
A prepared cell
Declared In
DTAttributedTextCell.hrequiredRowHeightInTableView:
Determines the row height that is needed in a specific table view to show the entire text content.
- (CGFloat)requiredRowHeightInTableView:(UITableView *)tableViewParameters
- tableView
The table view to determine the height for.
Discussion
The table view is necessary because from this the method can know the style. Also the accessory type needs to be set before calling this method because this reduces the available space.
Note: This value is only useful for table views with variable row height.
Declared In
DTAttributedTextCell.hsetHTMLString:
This method allows to set HTML text directly as content of the receiver.
- (void)setHTMLString:(NSString *)htmlParameters
- html
The HTML string to set as the receiver’s text content
Discussion
This will be converted to an attributed string.
Declared In
DTAttributedTextCell.hsetHTMLString:options:
This method allows to set HTML text directly as content of the receiver.
- (void)setHTMLString:(NSString *)html options:(NSDictionary *)optionsParameters
- html
The HTML string to set as the receiver’s text content
- options
The options used for rendering the HTML
Discussion
This will be converted to an attributed string.
Declared In
DTAttributedTextCell.h