我想在UITableViewCell的右侧显示图像。 我使用这个代码,做到这一点:UITableViewCell与右侧图像
CGRect imageRect = {80,0,225,44};
UIImageView *uiv = [[UIImageView alloc] initWithFrame:imageRect];
[uiv setImage:[UIImage imageNamed:[NSString stringWithFormat:@"star%@.png", [[self reataurant] valueForKey:@"stars"]]]];
[uiv setClipsToBounds:YES];
[cell addSubview:uiv];
我的问题是,该图像是在其他细胞中所示,当我滚动tableview中。 我在做什么错了?
的可能重复[HTTP://计算器的.com /问题/ 780395 /的UITableViewCell与 - 图像 - 上的右(http://stackoverflow.com/questions/780395/uitableviewcell-with-image-on-the-right) – Sreeram 2012-04-04 15:17:51