坚持让分享成为一种习惯
在自定义cell中加入以下代码
-(void)layoutSubviews
{
[super layoutSubviews];
for (UIControl *control in self.subviews){
if ([control isMemberOfClass:NSClassFromString(@"UITableViewCellEditControl")]){
for (UIView *v in control.subviews)
{
if ([v isKindOfClass: [UIImageView class]]) {
UIImageView *img=(UIImageView *)v;
if (self.selected) {
//选中时图片
img.image=[UIImage imageNamed:@"select"];
}else
{
//未选中时图片
img.image=[UIImage imageNamed:@"empty"];
}
}
}
}
}
}