1

alt text

see this tableview, i set 3labels in one row. the 3rd Label has more lines of text. it s not displaying i used the following code

// Configure the cell. UILabel *myLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 300, 20)]; UILabel *myLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(5, 25, 300, 22)]; UILabel *myLabel3 = [[UILabel alloc] initWithFrame:CGRectMake(8, 50, 300, 40)];

Book *aBook = [appDelegate.books objectAtIndex:indexPath.row];

    myLabel1.text=aBook.title;
 myLabel2.text=aBook.pubDate;
 myLabel3.text=aBook.description;

//myLabel3.lineBreakMode=UILineBreakModeCharacterWrap;

[cell.contentView addSubview:myLabel1]; [cell.contentView addSubview:myLabel2]; [cell.contentView addSubview:myLabel3];

//cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; //Set up the cell

return cell;

i applied characterwrap,wordwrap,numberof lines, sizetofit, adjusttofontsizewidth, but not get back my result. i need to display the 3 lines of text on 3rd Label i used with some alignment and also i need to remove HTML (&mdash) tags inside the Tableview because i am extract data from xml file (NSXMLParsing) Help me out

skaffman
  • 398,947
  • 96
  • 818
  • 769
Splendid
  • 1,061
  • 6
  • 16

0 Answers0