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,694
  • 1
  • 36
  • 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,268
  • 14
  • 81
  • 136
KudoCC
  • 6,852
  • 1
  • 22
  • 50