【发布时间】:2012-05-16 10:11:32
【问题描述】:
我正在尝试使用以下代码向UITableViewCell 添加背景图片:
UIImage *bgImage=[UIImage imageNamed:@"green-cell-row.png"];
UIImageView *bgForFirst=[[UIImageView alloc] initWithImage:bgImage];
cell.backgroundView=bgForFirst;
[cell.contentView addSubview:venueDisplayImage];
[cell.contentView addSubview:venueDisplayName1];
[cell.contentView addSubview:venueDisplayName2];
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
cell.selectionStyle = UITableViewCellSelectionStyleGray;
但是,我在它周围的空白处得到了场地显示名称。解决此问题并正确添加我的背景图片的最佳方法是什么?
【问题讨论】:
标签: iphone ios uitableview background-image