我有一个表格视图与分组的单元格。我希望这个单元格包含一个图像。这里是我的代码中插入图像,使之适合在细胞:不能适合tableViewCell中的图像
logoCell = [tableView dequeueReusableCellWithIdentifier:LogoCellIdentifier];
if (logoCell == nil) {
logoCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:LogoCellIdentifier];
}
UIImageView *imgView=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, logoCell.frame.size.width, 80)];
[imgView setImage:image];
[logoCell.contentView addSubview:imgView];
但我的形象比单电池的宽度大时的tableView是显示器。我怎样才能使它适合细胞?
谢谢,这正是我想要的 – louftansa