0

I have one Mutable array. I want to set the frame of text in UITableView.

if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.text = [appDelegate.UnitTypeAry objectAtIndex:indexPath.row];
cell.textLabel.frame = CGRectMake(10, 10, 150, 40);
βhargavḯ
  • 9,786
  • 1
  • 37
  • 59

1 Answers1

2

You need to implement a new class which inherits UITableViewCell and add the label in cell's contentView property.

change the label's frame in

-(void)layoutSubviews
{

}

of your new Cell Class

Maulik
  • 19,348
  • 14
  • 82
  • 137
KudoCC
  • 6,912
  • 1
  • 24
  • 53