2010-11-22 25 views

回答

0

爲您的自定義單元格中的每個子視圖設置框架屬性。

+0

由於伯恩的工作對我來說.... – 2010-11-22 07:03:06

0
cell.textLabel.text=[NSString stringWithFormat:@"year: %@   price: %@",[yearList objectAtIndex:indexPath.row],[priceList objectAtIndex:indexPath.row]]; 
0
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; 
// CGRect frame; 
// frame.origin.x=10; 
// frame.origin.y=5; 
// frame.size.height=20; 
// frame.size.width=100; 
// frame.origin.x+=90; 
// 
// priceLabel=[[UILabel alloc]initWithFrame:frame]; 
// priceLabel.textColor = [UIColor orangeColor]; 
// priceLabel.tag=PriceTag; 
// [cell.contentView addSubview:priceLabel]; 
// [priceLabel release]; 

// frame.origin.x+50; 
// yearLabel=[[UILabel alloc]initWithFrame:frame]; 
// yearLabel.tag=YearTag; 
// [cell.contentView addSubview:yearLabel]; 
// [yearLabel release]; 

//} 
// UILabel *priceLabel1=(UILabel*)[cell.contentView viewWithTag:PriceTag]; 
// priceLabel1.text=[priceList objectAtIndex:indexPath.row];