I created custom UITableViewCell.
@interface AnswerCell : UITableViewCell
@property (nonatomic, retain) IBOutlet UILabel *textLabel;
@property (nonatomic, retain) IBOutlet UILabel *detailTextLabel;
@end
and set detailTextLabel.numberOfLines = 0;
cell = [tableView dequeueReusableCellWithIdentifier:kAnswerIdentifier];
if (cell == nil)
{
[[NSBundle mainBundle] loadNibNamed:@"AnswerCell" owner:self options:nil];
cell=answerCell;
}
cell.detailTextLabel.text = [self extractText:indexPath forLabelAttribute:kDetailTextLabel];
cell.detailTextLabel.font = [self extractFont:indexPath forLabelAttribute:kDetailTextLabel];
cell.detailTextLabel.lineBreakMode = UILineBreakModeWordWrap;
cell.detailTextLabel.numberOfLines = 0;
UILabel shows only first line of the text. But why?
UPDATE: My detailTextLabel's height = 21. What do I need to do? Do I need to change height = 1000?